This lesson contains recommendations specifically for back-end software engineers.
Supply error codes
If an error code exists, include it as part of the error message. Error codes help technical users identify the error and find more information from an error index or error catalog.
Not recommended
Error: You already own this bucket. Select another name from the dropdown list.
Recommended
Error 409: You already own this bucket. Select another name from the dropdown list.
Include an Error Identifier
Engineers parse logs to learn how and why errors occurred; therefore, include an Error Identifier to help engineers find particular errors more easily. The Error Identifier should stay constant, even if the textual error message changes.
For more information, see the Errors unit of AIP-193.
Not recommended
{ “error” : “Bad Request - Request is missing a required parameter: -collection_name. Update parameter and resubmit.
Recommended
{ “error” : “Bad Request - Request is missing a required parameter: -collection_name. Update parameter and resubmit. Issue Reference Number BR0x0071” }