I'm looking at this answer, which does include a fair bit of useful-looking information, but starts out with a lengthy pitch for the author's open-source library, complete with diagrams and flashy ad-banner-like images, before you get to the (even longer) generic answer. I can't help but feel it would be better as a more concise answer with a link to the library's README and maybe another link to a blog post or wiki page or whatever, but on the other hand the author's clearly put a lot of work into it and I don't think it's violating the site guidelines in any obvious way. What's the sense of the community on posts like this?
-
2hmm... interesting... in sep 2019 it was edited by a mod, so it's not like it's flown under the radar– Kevin BCommented Apr 13, 2021 at 18:29
-
11Even the github feels like it's trying to sell me something. i don't quite get it– Kevin BCommented Apr 13, 2021 at 18:34
-
25I'd personally think the marketing language should go. It's fine for the author to explain how their library solves the OP's problem (it's not like they hide that it is from them) but all the stuff about how popular it is and how many downloads it has is just noise. The mod edit (I'm not sure they were a mod when they edited it actually) missed one of the screenshots of text as well.– BSMPCommented Apr 13, 2021 at 19:29
-
11I was honestly expecting much worse by your description. The answer starts with an "update" section mentioning the library, then mentions it again at the end of a relevant section discussing how error handling in Ruby on Rails works, then has a single short section covering the current library version. After that, the library is never mentioned again. To me, albeit as a non-SME, this answer appears to be overwhelmingly thorough. Maybe some cleanup is warranted, but it looks like a really valuable answer. I'm really glad not all answers on SO look like this, but I think this one's fine tbh.– zcoop98Commented Apr 13, 2021 at 20:26
-
6@zcoop98 Content that belongs does not justify any content that doesn't belong.– philipxyCommented Apr 13, 2021 at 21:10
-
@philipxy You're right. To be crystal clear, I think mentioning the library is fine, especially in the section explaining why the library answers the question. The "update" section and the changelog though, in my opinion, add nothing, and should be removed.– zcoop98Commented Apr 13, 2021 at 22:14
-
5Agreed that marketing content (be it open source or not) has no place in questions, answers, or tag wikis. I removed the marketing screenshot and text that does not have anything with describing how the gem works while keeping the rest. Plus made some editorial fixes. Agreed with @zcoop98 - changelog has no place in posts (unless relevant, but it does not seem to be the case), but I refrained from removing it until there is a consensus.– 0ValtCommented Apr 13, 2021 at 23:00
-
2Upon rereading the answer, the changelog proved to be superfluous, so I opted to trim it out in the end as well (doesn't seem like anyone is defending this section - in case of disagreement, please rollback and feel free to ping me).– 0ValtCommented Apr 14, 2021 at 9:23
-
1@BSMP: meagar has been a mod for quite a number of years.– BoltClock ModCommented Apr 14, 2021 at 11:52
-
1@BoltClock I would have bet money there was a different name on that edit before your comment made me double check. Ugh, I must have been seriously tired.– BSMPCommented Apr 14, 2021 at 20:18
3 Answers
This is over the line. The question is essentially:
where is the default 500 error message coming from?
Which this post [1] answered perfectly:
The Error you are experiencing is being thrown from
You dont have to trust my opinion, as OP accepted this answer as well. However the answer you are referring to, is literally nine full screen pages [2][3][4][5][6][7][8][9][10]. While that length is fine in some cases, this is not one of those cases. The long answer even has extended HTML CSS code blocks? I think we should clean that up.
- https://stackoverflow.com/questions/19103759#19346144
- https://i.sstatic.net/zQORI.png
- https://i.sstatic.net/zxnJd.png
- https://i.sstatic.net/9bGUJ.png
- https://i.sstatic.net/3s3MY.png
- https://i.sstatic.net/kAg8i.png
- https://i.sstatic.net/kd9C7.png
- https://i.sstatic.net/Kxazw.png
- https://i.sstatic.net/ygCKC.png
- https://i.sstatic.net/nWZ7e.png
FAILSAFE_RESPONSE = [500, { 'Content-Type' => 'text/plain' },
["500 Internal Server Error\n" \
"If you are the administrator of this website, then please read this web " \
"application's log file and/or the web server's log file to find out what " \
"went wrong."]]
-
28I'm all for removing the overboard advertisement, but I would pause before trying to curb the length. The answer is the most upvoted one to the given question, and has a comment praising its thorough nature, which tells me that many have appreciated how detailed this answer is.– zcoop98Commented Apr 13, 2021 at 22:20
-
17Don't change the poster's intent/presentation other than removing advertising. If there's a core that answers by itself, it is reasonable to edit to clarify that.– philipxyCommented Apr 13, 2021 at 22:20
-
1You may also want to fix the headings in the post; this appears to be a CommonMark migration leftover, and your first edit broke the unconverted markdown headers.– zcoop98Commented Apr 13, 2021 at 22:21
-
13to anyone reading this: stop editing my post. I didnt embed the images, because I didnt want to advertise the answer all over again. That answer shouldnt be an ad, and neither should this one.– ZomboCommented Apr 15, 2021 at 13:55
-
@StevenPenny It might be more obvious that you didn't intend the images to be linked if you removed the numbers in brackets, and just left the link list.– trlklyCommented Apr 15, 2021 at 23:57
-
4Wait, how is that GitHub snippet displayed here but not on the main site? That's pretty cool, but I'm confused. Is that a new feature that isn't fully available yet? Commented Apr 16, 2021 at 9:31
-
2@StevenPenny What you said was that you didn't want people embedding the images, because it would result in advertising. I simply pointed out that your post appears poorly formatted, and that's why people are trying to fix it. I thought that, since you cared enough to complain, you might also care enough to reformat your post in a way that would make it more obvious that it was not a formatting error, by not using the brackets that look like they're supposed to be embedded images. Not everyone is going to read the comments before editing.– trlklyCommented Apr 23, 2021 at 8:41
I disagree with the premise of Ian's answer that there is a conflict in having both long and short answers. Currently the question has a good short answer and a good long answer. The best of both worlds. Answers that are broader than the question asked is not an inherent problem.
-
-
1I never suggested there is a conflict; I suggested that the long answer's helpfulness is hindered by its length, and that it could be made far more helpful with a very judicious edit. And your example is just plain bad; find one that has a good long answer that's nine freaking pages long, like the question being discussed, then get back to me.– Ian KempCommented Apr 14, 2021 at 12:19
-
1
Not okay.
Obviously the marketing-related cruft should be clipped, but the answer as a whole is problematic for me. The question was relatively simple, therefore I'd expect any answer to be correspondingly simple; yet here we have an answer that is basically documenting the entirety of Rails' exception-handling mechanism and every possible option for hooking into it, in exhaustive detail. There's also a lot of repetition.
In short, this "answer" isn't; it's documentation. And while I appreciate thorough answers as much as anyone, I don't believe that Stack Overflow is a place for documentation.
So here's my suggestion: cut the answer down to its basics, which to me is the following piece:
There are two ways to handle exceptions:
- Overriding 404 / 500 routes
- Invoking a controller
and then reshuffle and prune the current content to address those two options. Richard Peck's exception_handler
gem can then be noted as a possibility under (2).
Yes, I know this goes against the rule of "answers shall not be drastically edited" but I honestly don't believe this answer is particularly useful in its current form. Brevity is often as important as verbosity, especially when it comes to Q&A.