Skip to content

Commit e456868

Browse files
committed
error code fixes
1 parent 04ab617 commit e456868

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

graph/GuidelinesGraph.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ Since objects of complex types on Graph don’t have unique identifiers, they ar
216216
<Property Name="country" Type="Edm.String" />
217217
</ComplexType>
218218
```
219-
| Microsoft Graph rules for modeling complex resources | |
220-
|---------------------------------------|------------------------------------------------------------|
219+
| Microsoft Graph rules for modeling complex resources |
220+
|----------------------------------------------------------------------------------------|
221221
| :heavy_check_mark: **MUST** use String type for id |
222222
| :heavy_check_mark: **MUST** use a primary key composed of a single property |
223223
| :heavy_check_mark: **MUST** use an object as the root of all JSON payloads |
@@ -278,7 +278,6 @@ APIs SHOULD use resource-based designs with standard HTTP methods rather than op
278278

279279
Bound operations must have a binding parameter matching the type of the bound resource.
280280
In addition both actions and functions support overloading, meaning an API definition may contain multiple actions or functions with the same name.
281-
Microsoft Graph supports the use of optional parameters. You can use the optional parameter annotation instead of creating function or action overloads.
282281

283282
For a complete list of standard HTTP operations you can refer to the [Microsoft
284283
REST API Guidelines](https://github.com/microsoft/api-guidelines/blob/master/Guidelines.md#7102-error-condition-responses).
@@ -306,7 +305,7 @@ and consistency by using recommended Graph error model and the Graph Utilities l
306305
The top-level error code must be aligned with HTTP response status codes according to [rfc7231 (ietf.org)](https://datatracker.ietf.org/doc/html/rfc7231#section-6).
307306
The following examples demonstrate error modeling for common use cases:
308307

309-
- **Simple error**: A workload wants to report an error with top-level details
308+
- **Simple error**: An API wants to report an error with top-level details
310309
only. Then the error object contains the top-level error code, message and
311310
target (optional).
312311

@@ -341,9 +340,9 @@ The following examples demonstrate error modeling for common use cases:
341340
| Microsoft Graph enforces the following error rules |
342341
|-----------------------------------------------------------------------------------------------------------------------|
343342
| :heavy_check_mark: **MUST** return an error property with a child code property in all error responses. |
344-
| :heavy_check_mark: **MUST** return a 403 Forbidden error when insufficient scopes are present in the auth token. |
345-
| :heavy_check_mark: **MUST** return a 429 Too many requests error when the caller has exceeded throttling limits. |
346-
| :ballot_box_with_check: **SHOULD** return a 404 Not found error if a 403 would result in information disclosure. |
343+
| :heavy_check_mark: **MUST** return a 403 Forbidden error when the application or signed-in user have insufficient permissions are present in the auth token. |
344+
| :heavy_check_mark: **MUST** return a 429 Too Many Requests error when client exceeded throttling limits and 503 Service Unavailable when service overloaded but client is within throttling limits.|
345+
| :ballot_box_with_check: **SHOULD** return a 404 Not Found error if a 403 would result in information disclosure. |
347346

348347
For a complete mapping of error codes to HTTP statuses you can refer to the
349348
[rfc7231 (ietf.org)](https://datatracker.ietf.org/doc/html/rfc7231#section-6).

0 commit comments

Comments
 (0)