Skip to content

Commit 297b0a5

Browse files
committed
Reorder the guidelines so the error contract is clearer
1 parent 0ab68b1 commit 297b0a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

azure/Guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,6 @@ There are 2 kinds of errors:
302302

303303
:white_check_mark: **DO** ensure that the top-level error's `code` value is identical to the `x-ms-error-code` header's value.
304304

305-
:white_check_mark: **DO** document the service's error code strings; they are part of the API contract.
306-
307305
:white_check_mark: **DO** provide a response body with the following structure:
308306

309307
**ErrorResponse** : Object
@@ -347,6 +345,8 @@ Example:
347345

348346
:heavy_check_mark: **YOU MAY** group common customer code errors into a few `x-ms-error-code` string values.
349347

348+
:white_check_mark: **DO** document the service's top-level error code strings; they are part of the API contract.
349+
350350
:heavy_check_mark: **YOU MAY** treat the other fields as you wish as they are _not_ considered part of your service's API contract and customers should not take a dependency on them or their value. They exist to help customers self-diagnose issues.
351351

352352
:heavy_check_mark: **YOU MAY** add additional properties for any data values in your error message so customers don't resort to parsing your error message. For example, an error with `"message": "A maximum of 16 keys are allowed per account."` might also add a `"maximumKeys": 16` property. This is not part of your API contract and should only be used for diagnosing problems.

0 commit comments

Comments
 (0)