Skip to content

Conversation

@sreuter
Copy link

@sreuter sreuter commented Jul 1, 2015

Endpoints often return a 201 ("Created") instead of a 200 ("OK"). That's still cool, tho ;)

steffentchr added a commit that referenced this pull request Jul 1, 2015
Accept status code 2XX instead of just 200.
@steffentchr steffentchr merged commit a8cc565 into 23:master Jul 1, 2015
@vsivsi
Copy link
Contributor

vsivsi commented Jul 14, 2015

@sreuter @steffentchr

In my opinion this change is too broad. I'm fine with adding 201, but this lumps all 2XX into the same category.

My package has been using 204 as a response code (literally meaning: "No content"), and this PR blatantly breaks that by flipping the meaning of 204.

The reason I don't use 404 or some other non-2XX response code is because most browsers log such responses to the console as failures, which leads to an endless stream of issues reported for my package because people assume that something is wrong because of all the 404s. See for example:
vsivsi/meteor-file-collection#51

I'm happy to file a separate issue on this, but I wanted to check in here first since this is the context that introduced this change.

@vsivsi
Copy link
Contributor

vsivsi commented Jul 14, 2015

FYI, I just created a PR maintaining 201 as success, as was requested in this PR, but reverting 202-2xx back to their previous meaning. #236

@sreuter
Copy link
Author

sreuter commented Jul 14, 2015

While I still think the new behaviour is more "correct" and endusers shouldn't look into developer console, I don't have a strong opinion on this. As long as 201 is still considered a positive response, I'm good.

@sreuter
Copy link
Author

sreuter commented Jul 14, 2015

@steffentchr As this is still a change in behaviour, can you keep that in mind when choosing the next release/version number?

@vsivsi
Copy link
Contributor

vsivsi commented Jul 14, 2015

It wasn't end-users reporting errors, it was developers attempting to use my package in their apps (under Meteor.js) and reporting issues against the package because they were alarmed by all the 404s when uploading large files during testing.

Anyway, thanks for responding, I'm glad you're okay with the change.

@sreuter
Copy link
Author

sreuter commented Jul 14, 2015

Gotcha, thanks for reaching out!

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

Successfully merging this pull request may close these issues.

4 participants