Skip to content

Commit 92c9488

Browse files
authored
Merge pull request #339 from tg-msft/error-ordering
Reorder the guidelines so the error contract is clearer
2 parents ec1d62d + fadddfa commit 92c9488

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

azure/Guidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ There are 2 kinds of errors:
301301

302302
:white_check_mark: **DO** carefully craft unique `x-ms-error-code` string values for errors that are recoverable at runtime. Reuse common error codes for usage errors that are not recoverable.
303303

304-
:white_check_mark: **DO** ensure that the top-level error's `code` value is identical to the `x-ms-error-code` header's value.
304+
:heavy_check_mark: **YOU MAY** group common customer code errors into a few `x-ms-error-code` string values.
305305

306-
:white_check_mark: **DO** document the service's error code strings; they are part of the API contract.
306+
:white_check_mark: **DO** ensure that the top-level error's `code` value is identical to the `x-ms-error-code` header's value.
307307

308308
:white_check_mark: **DO** provide a response body with the following structure:
309309

@@ -346,7 +346,7 @@ Example:
346346
}
347347
```
348348

349-
:heavy_check_mark: **YOU MAY** group common customer code errors into a few `x-ms-error-code` string values.
349+
:white_check_mark: **DO** document the service's top-level error code strings; they are part of the API contract.
350350

351351
: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.
352352

0 commit comments

Comments
 (0)