I checked out Read-Only Mode Overview but I'm still unsure of how our API will respond, particularly the response code. Will POST/PUT requests automatically return a 503 service unavailable or will the Apex execute and try to issue DML statements and then fail with INSERT_UPDATE_DELETE_NOT_ALLOWED_DURING_MAINTENANCE/InvalidReadOnlyUserDmlException?
Ideally, I'd like to give our client a heads up what to expect.
InvalidReadOnlyUserDmlException
would happened when you execute your APEX DML. The error code would be determined by your error handling of the exception. If it's the standard rest API then you'll get theINSERT_UPDATE_DELETE_NOT_ALLOWED_DURING_MAINTENANCE
error, but not sure what the Error code will be