Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent "Parse Error" with a 204 response #8684

Closed
jonscheiding opened this issue Jun 19, 2020 · 1 comment
Closed

Intermittent "Parse Error" with a 204 response #8684

jonscheiding opened this issue Jun 19, 2020 · 1 comment

Comments

@jonscheiding
Copy link

Describe the bug
Our API returns 204 responses for certain requests. When we execute these requests in Postman, we almost always get a "Parse Error".

Unfortunately, we don't have a URL we can share as the API is private.

Postman gives this error most of the time:

Screen Shot 2020-06-19 at 12 40 20 PM

The console doesn't contain any added information.

Occasionally (maybe 1 time out of every 10), making the request with Postman will work as expected.

Copying the CURL from Postman and running it directly:

❯ curl -i --location --request POST 'https://somedomain.com/some/url' \
--header 'Content-Type: application/json; charset=UTF-8' \
--data-raw ''
HTTP/1.1 204 No Content
Date: Fri, 19 Jun 2020 16:34:57 GMT
Server: Apache
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type,accept,origin
Access-Control-Allow-Methods: GET,POST,DELETE,PUT,PATCH
Access-Control-Max-Age: 86400
Connection: close
Content-Type: application/json; charset=UTF-8

❯

(I ran it quite a few times and always got the same result.)

I've tried fiddling with the headers including adding a Content-Length: 0 header and removing the Access-Control-* ones, but got the same behavior.

App information (please complete the following information):

  • Native App
  • Postman Version 7.26.1
  • macOS Catalina 10.15.5 (I believe also reproduced on Windows)
@jonscheiding
Copy link
Author

Figured out that this was because our server was sending content with the 204 response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant