Skip to content

Instantly share code, notes, and snippets.

@philsturgeon
Last active September 23, 2015 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philsturgeon/e2da73b1d2fab57ee413 to your computer and use it in GitHub Desktop.
Save philsturgeon/e2da73b1d2fab57ee413 to your computer and use it in GitHub Desktop.
Reply to Just Learn Rails Part 3
@yez
Copy link

yez commented Sep 23, 2015

Seems like you understood my post to say "having no response body with an error message was the absolute best thing to do and everything else is not worth the effort". On the contrary, I want to make APIs that are rich but not overly verbose. Response bodies explaining errors are fine and if they help developers debug issues then that's just fantastic. The point I was making was to steer people away from simple out of the box responses that Rails gives you, that's it. A 200 with an error message is not great, I think we can agree on that.

I want to make good software and help others do the same. My post was meant to be simply directional. All that being said, I can't stop you from posting anything.

@philsturgeon
Copy link
Author

I absolutely 100% understand the goals of the article when you set out.

  1. Don't return errors on 200. Agreed.
  2. Don't hardcode these numbers, use convent alternatives like symbols or constants. Agreed.

If that was what your article said, that would be fine, but the whole tone throughout that just a HTTP status code is enough, ever, is an absolute fallacy that is misleading your readers into doing something really really awful.

Not only do you backhandedly suggest that a HTTP status code is enough, you continuously scoff at people who use error messages.

That is what I am asking you to change in your article, which I do not thing is unfair, for the reasons I have highlighted.

I'm gonna post this either way, but I'll remove the link to you specifically if you change the tone of your post to be one that isn't misleading and full of fallacy. :)

@yez
Copy link

yez commented Sep 23, 2015

Keep the link in place, it doesn't bother me. Since you have come to this understanding of my article, I assume others will too. I will think about how to accurately reword.

@philsturgeon
Copy link
Author

People will absolutely come to this conclusion, even if it's not what you meant. As far as I'm concerned it's what it says, plain as day.

Words are hard, and I've been in the reverse situation. Do your best to change it, and thanks for listening!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment