Mailosaur uses HTTP response codes to indicate the success or failure of an API request. We recommend writing code that can handle these different scenarios.
HTTP Status Codes
Mailosaur uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the
2xx range indicate success, codes in the
4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted), and codes in the
5xx range indicate an error with Mailosaur’s servers (give us a shout in the unlikely event that you see one of those).
|Request was successful.|
|Request was successful, no response content.|
|The request could not be handled, often due to missing a required parameter.|
|No valid API key provided.|
|The requested resource doesn’t exist.|
|Something went wrong at Mailosaur. (Give us a shout).|
In case of an error the server will return as much information as possible. In the case of a
404 error the status code gives as much information as you’d need. But for
400 errors Mailosaur will return a JSON object containing the structure below.
Note that our client libraries convert responses to appropriate language-specific objects.
|The type of error returned.|
|A human-readable message providing more details about the error.|
|A JSON object containing a key for each property name at fault, with a human-readable message per field.|
|The request model that was sent and failed to be processed.|