Open NewGHUser4321 opened 2 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@NewGHUser4321 - thank you for reporting this one.
Does the behavior of spHttpClient
differ form plain REST call?
What do you mean by plain REST call? I haven't tested anything else.
spHttpClient
is the helper class (wrapper) for SharePoint REST API.
If you use standard fetch
or post
browser function and send the appropriate request to the REST endpoint - will that return the same result as spHttpClient
?
Just tested it, same response with browser fetch
also. Returns status code 200 but list item is not added.
Thanks @NewGHUser4321 for testing that! It helped triage the issue correctly.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
When a invalid short URL is sent in the spHttpClient AddValidateUpdateItemUsingPath() request, it is returning status code 200 even though there are errors in the response and, the list item is not added to the list. If the URL is too long, returns the status code 500 and working as expected.
Here are my request and response details:
Request Headers:
Payload for this Request is:
Here is field details from above payload in which I'm sending the invalid URL:
And the Response is
Here is the field level response details from the above in which we see error for invalid URL:
Steps to reproduce
Expected behavior