Clear error messages¶
Provide useful error messages
Graceful handling of failure conditions is an essential part of delivering a high quality API.
Error messages should conform to the standards relevant for the technology in use.
Error messages should provide a human-readable error message that is designed to be read and understood by the user.
Error messages should include a diagnostic message that contains technical details for use by the developers/maintainers of the application that consumes the API.
Diagnostic messages may include links to documentation and other ‘hints’ that might assist developers resolve issues that may have resulted in the error condition.
Further information on error messaging for REST APIs is provided in the Build and publish APIs guidance.