Skip to content

Commit d94fae3

Browse files
committed
Edits
1 parent d6c416b commit d94fae3

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

support/power-platform/dataverse/dataverse-web-api-and-sdk/web-api-client-errors.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ HTTP/1.1 404 Not Found
4545

4646
### Cause
4747

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`.
4949

5050
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.
5151

5252
### How to avoid
5353

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.
5555
- 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).
5656
- 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.
5757

@@ -82,7 +82,7 @@ HTTP/1.1 400 Bad Request
8282

8383
This error occurs when you use the incorrect name for a property. Property names are case sensitive.
8484

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`.
8686

8787
### How to avoid
8888

@@ -113,11 +113,11 @@ HTTP/1.1 404 Not Found
113113

114114
### Cause
115115

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.
117117

118118
### How to avoid
119119

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:
121121

122122
- [Web API Actions](/power-apps/developer/data-platform/webapi/web-api-actions)
123123
- [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
177177
**Request**
178178

179179
```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
181181
182182
{
183183
"firstname":"test",
@@ -205,9 +205,9 @@ HTTP/1.1 400 Bad Request
205205

206206
#### Cause
207207

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).
209209

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.
211211

212212
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`.
213213

@@ -253,15 +253,15 @@ at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type,
253253

254254
#### Cause
255255

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.
257257

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.
259259

260-
This payload will work:
260+
This payload works:
261261

262262
:::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.":::
263263

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`.
265265

266266
:::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.":::
267267

@@ -273,16 +273,16 @@ Ensure all line endings in the `$batch` request body are `CRLF`. If you can't us
273273

274274
## Invalid OData Annotation values inside Prefer request header value
275275

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.
277277

278278
### Symptoms
279279

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-annotations is 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.
281281

282282
**Request**
283283

284284
```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
286286
287287
Prefer: odata.include-annotations=\"*\"
288288
@@ -309,11 +309,11 @@ HTTP/1.1 400 Bad Request
309309
310310
```
311311

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.
313313

314314
### Cause
315315

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.
317317

318318
### How to avoid
319319

0 commit comments

Comments
 (0)