You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -238,7 +239,7 @@ Because of this, required fields can only be introduced in the 1st version of a
238
239
239
240
:white_check_mark:**DO** make fields simple and maintain a shallow hierarchy.
240
241
241
-
:white_check_mark:**DO** use camel case for all JSON field names.
242
+
:white_check_mark:**DO** use camel case for all JSON field names. Do not upper-case acronyms; use camel case.
242
243
243
244
:white_check_mark:**DO** treat JSON field names with case-sensitivity.
244
245
@@ -282,17 +283,42 @@ There are 2 kinds of errors:
282
283
- An error where you expect customer code to gracefully recover at runtime
283
284
- An error indicating a bug in customer code that is unlikely to be recoverable at runtime; the customer must just fix their code
284
285
285
-
:white_check_mark:**DO** return error an `x-ms-error-code` response header with a string value indicating what went wrong.
286
+
:white_check_mark:**DO** return an `x-ms-error-code` response header with a string error code indicating what went wrong.
286
287
287
288
*NOTE: Error code values are part of your API contract (because customer code is likely to do comparisons against them) and cannot change in the future.*
288
289
289
290
:white_check_mark:**DO** carefully craft `x-ms-error-code` string values for errors that are recoverable at runtime.
290
291
291
-
:white_check_mark:**DO** ensure that the top-level `code` field's value is identical to the `x-ms-error-code` header's value (see example body below).
292
+
:white_check_mark:**DO** ensure that the top-level `code` field's value is identical to the `x-ms-error-code` header's value.
292
293
293
294
:white_check_mark:**DO** document the service's error code strings; they are part of the API contract.
294
295
295
-
:white_check_mark:**DO** provide a response body as follows (example):
296
+
:white_check_mark:**DO** provide a response body with the following structure:
297
+
298
+
**ErrorResponse** : Object
299
+
300
+
Property | Type | Required | Description
301
+
-------- | ---- | :------: | -----------
302
+
`error` | ErrorDetail | ✔ | The error object.
303
+
304
+
**ErrorDetail** : Object
305
+
306
+
Property | Type | Required | Description
307
+
-------- | ---- | :------: | -----------
308
+
`code` | String | ✔ | One of a server-defined set of error codes.
309
+
`message` | String | ✔ | A human-readable representation of the error.
310
+
`target` | String | | The target of the error.
311
+
`details` | ErrorDetail[] | | An array of details about specific errors that led to this reported error.
312
+
`innererror` | InnerError | | An object containing more specific information than the current object about the error.
313
+
314
+
**InnerError** : Object
315
+
316
+
Property | Type | Required | Description
317
+
-------- | ---- | :------: | -----------
318
+
`code` | String | | A more specific error code than was provided by the containing error.
319
+
`innererror` | InnerError | | An object containing more specific information than the current object about the error.
0 commit comments