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
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,13 +45,13 @@ HTTP/1.1 404 Not Found
45
45
46
46
### Cause
47
47
48
-
This error occurs when you use the incorrect name for a resource. That resource might be the name of an entity set, a function or an action. These resource names are case sensitive. In the preceding example, there is an entity set called `accounts`, but not one named `Account`.
48
+
This error occurs when you use the incorrect name for a resource. That resource might be the name of an entity set, a function, or an action. These resource names are case sensitive. In the preceding example, there's an entity set called `accounts`, but not one named `Account`.
49
49
50
50
If the resource is an action defined as a [custom process action](/power-apps/developer/data-platform/workflow-custom-actions), this error can also happen if the custom process action is inactive.
51
51
52
52
### How to avoid
53
53
54
-
- If the resource is an entity type, query the Web API [Service document](/power-apps/developer/data-platform/webapi/web-api-service-documents#service-document) which will provide a list of all the known entity set names.
54
+
- If the resource is an entity type, query the Web API [Service document](/power-apps/developer/data-platform/webapi/web-api-service-documents#service-document) which provides a list of all the known entity set names.
55
55
- If the resource is a function or action, verify that the name you use exists in the [CSDL $metadata document](/power-apps/developer/data-platform/webapi/web-api-service-documents#csdl-metadata-document).
56
56
- If the action doesn't exist in the [CSDL $metadata document](/power-apps/developer/data-platform/webapi/web-api-service-documents#csdl-metadata-document), it might be an inactive [custom process action](/power-apps/developer/data-platform/workflow-custom-actions). You should verify that it's active.
57
57
@@ -82,7 +82,7 @@ HTTP/1.1 400 Bad Request
82
82
83
83
This error occurs when you use the incorrect name for a property. Property names are case sensitive.
84
84
85
-
In the preceding example, there is a property called `name`, but not one named `Name`.
85
+
In the preceding example, there's a property called `name`, but not one named `Name`.
86
86
87
87
### How to avoid
88
88
@@ -113,11 +113,11 @@ 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, <xref:Microsoft.Dynamics.CRM.WhoAmI?text=WhoAmI Function> 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, [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
120
-
Be aware of what kind of OData operation you are using and the correct HTTP method to use. For more information, see:
120
+
Be aware of what kind of OData operation you're using and the correct HTTP method to use. For more information, see:
121
121
122
122
-[Web API Actions](/power-apps/developer/data-platform/webapi/web-api-actions)
123
123
-[Use Web API actions](/power-apps/developer/data-platform/webapi/use-web-api-actions)
@@ -177,7 +177,7 @@ This error occurs when an invalid navigation property name is sent with a reques
177
177
**Request**
178
178
179
179
```http
180
-
POST [Organization URI]/api/data/v9.0/contacts HTTP/1.1
180
+
POST [Organization URI]/api/data/v9.2/contacts HTTP/1.1
181
181
182
182
{
183
183
"firstname":"test",
@@ -205,9 +205,9 @@ HTTP/1.1 400 Bad Request
205
205
206
206
#### Cause
207
207
208
-
This error occurs because there is no single-valued navigation property in the contact entity type named `parentcustomerid`. For more information, see [contact EntityType > Single-valued navigation properties](/power-apps/developer/data-platform/webapi/reference/contact#single-valued-navigation-properties).
208
+
This error occurs because there's no single-valued navigation property in the contact entity type named `parentcustomerid`. For more information, see [contact EntityType > Single-valued navigation properties](/power-apps/developer/data-platform/webapi/reference/contact#single-valued-navigation-properties).
209
209
210
-
`parentcustomerid` is the logical name of a lookup column in the contact table. All lookups are represented by single-valued navigation properties in OData. The names of the lookup properties don't always match the corresponding single-valued navigation property name.
210
+
`parentcustomerid` is the logical name of a lookup column in the contact table. All lookups have one or more single-valued navigation properties in OData. The names of the lookup properties don't always match the corresponding single-valued navigation property name.
211
211
212
212
In this case, the `parentcustomerid` column is a customer lookup type, a kind of [multi-table lookup](/power-apps/developer/data-platform/webapi/web-api-navigation-properties#multi-table-lookups) that might link to either the account or contact tables. To support this customer lookup, there are two separate relationships and each has a different single-valued navigation property. The correct single-valued navigation property in this case is `parentcustomerid_account`.
213
213
@@ -253,15 +253,15 @@ at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type,
253
253
254
254
#### Cause
255
255
256
-
This deserialization error is caused by the use of line endings other than [CRLF](https://developer.mozilla.org/docs/Glossary/CRLF) in the batch request body.
256
+
The use of line endings other than [CRLF](https://developer.mozilla.org/docs/Glossary/CRLF) in the batch request body causes this deserialization error.
257
257
258
-
Depending on the editor you use, these non-printing characters can be difficult to see. If you use [Notepad++](https://notepad-plus-plus.org/), you can use the **Show all characters** option to make these characters visible.
258
+
Depending on the editor you use, these nonprinting characters can be difficult to see. If you use [Notepad++](https://notepad-plus-plus.org/), you can use the **Show all characters** option to make these characters visible.
259
259
260
-
This payload will work:
260
+
This payload works:
261
261
262
262
:::image type="content" source="media/web-api-client-errors/batch-request-body-with-crlf-endings-for-all-lines.png" alt-text="Screenshot that shows a batch request body with CRLF endings for all lines.":::
263
263
264
-
This payload will fail because the last line doesn't end with `CRLF`.
264
+
This payload fails because the last line doesn't end with `CRLF`.
265
265
266
266
:::image type="content" source="media/web-api-client-errors/batch-request-body-with-crlf-missing-last-line.png" alt-text="Screenshot that shows a batch request body with CRLF missing on the last line.":::
267
267
@@ -273,16 +273,16 @@ Ensure all line endings in the `$batch` request body are `CRLF`. If you can't us
273
273
274
274
## Invalid OData Annotation values inside Prefer request header value
275
275
276
-
These errors occur when Dataverse Web API receives requests with an invalid odata.include-annotations value inside the Prefer request header values.
276
+
These errors occur when Dataverse Web API receives requests with an invalid odata.include-annotations value inside the `Prefer` request header values.
277
277
278
278
### Symptoms
279
279
280
-
When sending a request using `POST`, `PATCH`, or `PUT` and a `Prefer` request header that contains an invalid value. In the following example the odata.include-annotationsis incorrectly including back slashes '\\' to escape the quote characters.
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.
281
281
282
282
**Request**
283
283
284
284
```http
285
-
POST [Organization URI]/api/data/v9.0/contacts HTTP/1.1
285
+
POST [Organization URI]/api/data/v9.2/contacts HTTP/1.1
286
286
287
287
Prefer: odata.include-annotations=\"*\"
288
288
@@ -309,11 +309,11 @@ HTTP/1.1 400 Bad Request
309
309
310
310
```
311
311
312
-
This is the same error you would get when sending a request using `GET` with an improperly formatted odata.include-annotations value.
312
+
You get the same error when sending a request using `GET` with an improperly formatted `odata.include-annotations` value.
313
313
314
314
### Cause
315
315
316
-
To provide more secure service, we have fixed an issue that allowed invalid `Prefer` request header values to be processed without being validated first. This error will occur starting with Dataverse version `9.2.2412.3` which began deployment in January of 2025 and will deployed to all regions in February of 2025.
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.
0 commit comments