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
Copy file name to clipboardExpand all lines: support/power-platform/dataverse/dataverse-web-api-and-sdk/web-api-client-errors.md
+6-14Lines changed: 6 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Troubleshoot Web API client errors
3
3
description: Provides resolutions for the common client errors that occur when you use the Dataverse Web API.
4
-
ms.date: 06/12/2024
4
+
ms.date: 01/23/2024
5
5
ms.custom: sap:Dataverse Web API and SDK\Odata endpoint errors
6
6
author: divkamath
7
7
ms.author: dikamath
@@ -113,7 +113,7 @@ HTTP/1.1 404 Not Found
113
113
114
114
### Cause
115
115
116
-
This error occurs when the incorrect HTTP method is applied to a function or action. In this case, [WhoAmI Function](xref:Microsoft.Dynamics.CRM.WhoAmI) requires the use of `GET` but `POST` was used.
116
+
This error occurs when the incorrect HTTP method is applied to a function or action. In this case, the [WhoAmI function](xref:Microsoft.Dynamics.CRM.WhoAmI) requires the use of `GET` but `POST` was used.
117
117
118
118
### How to avoid
119
119
@@ -271,13 +271,11 @@ In this case, just adding a carriage return at the end of the last line is enoug
271
271
272
272
Ensure all line endings in the `$batch` request body are `CRLF`. If you can't use `CRLF`, add two non-`CRLF` line endings at the end of the batch request body to resolve this deserialization error. For more information, see [Batch requests](/power-apps/developer/data-platform/webapi/execute-batch-operations-using-web-api#batch-requests).
273
273
274
-
## Invalid OData Annotation values inside Prefer request header value
275
-
276
-
These errors occur when Dataverse Web API receives requests with an invalid `odata.include-annotations` value inside the `Prefer` request header values.
274
+
## Error identified on the 'odata.include-annotations' value inside the 'Prefer' header
277
275
278
276
### Symptoms
279
277
280
-
This error occurs when you send a request using `POST`, `PATCH`, or `PUT` Http methods and a `Prefer` request header that contains an invalid value. In the following example, the `odata.include-annotations` value is incorrectly including back slashes '`\`' to escape the quote characters.
278
+
The error occurs when the [Dataverse Web API](/power-apps/developer/data-platform/webapi/overview) receives a request with an invalid `odata.include-annotations` value in the `Prefer` request header value. This issue occurs when the request is sent using the `POST`, `PATCH`, `PUT`or `GET` HTTP methods with a `Prefer` request header that contains an invalid or improperly formatted value. For example, the `odata.include-annotations` value incorrectly includes backslashes '`\`' to escape the quote characters.
You get the following error when you submit a `POST`, `PATCH`, or `PUT` request.
297
-
298
293
**Response**
299
294
300
295
```http
@@ -306,18 +301,15 @@ HTTP/1.1 400 Bad Request
306
301
See exception message for more details 'An error occurred when parsing the HTTP header 'Prefer'. The header value 'odata.include-annotations=\\\"*\\\"' is incorrect at position '26' because the escape character '\\' is not inside a quoted-string.'.",
307
302
"ErrorCode": "0x80097303"
308
303
}
309
-
310
304
```
311
305
312
-
You get the same error when sending a request using `GET` with an improperly formatted `odata.include-annotations` value.
313
-
314
306
### Cause
315
307
316
-
To provide a more secure service, we fixed an issue that allowed invalid `Prefer` request header values to be processed when using `POST`, `PATCH`, or `PUT`without being validated first. Now, validation occurs regardless of the HTTP method. This error will occur starting with Dataverse version `9.2.2412.3` which began deployment in January of 2025 and will be deployed to all regions in February of 2025.
308
+
To provide a more secure service, we have fixed an issue where invalid `Prefer` request header values were processed without validation when using the `POST`, `PATCH`, or `PUT`HTTP methods. Now, validation is enforced for all HTTP methods. This error will occur starting with Dataverse version 9.2.2412.3 that began deployment in January 2025 and will be deployed to all regions by February 2025.
317
309
318
310
### How to avoid
319
311
320
-
Review the guidance about how to properly set [Prefer Headers in the Dataverse Web API documentation](/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors#prefer-headers).
312
+
Review the guidance about how to properly set [Prefer headers in the Dataverse Web API](/power-apps/developer/data-platform/webapi/compose-http-requests-handle-errors#prefer-headers).
0 commit comments