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
Update ShowExceptions to suit latest rack master #907
Conversation
* Post 893a2c50 in rack/rack, the #pretty method used while generating the HTML error markup, implemented in Rack::ShowExceptions, returns a String instead of an Array. This change uses Array() to convert the exception string in both plain text and HTML modes to an array.
Although this seems to fix that error, the discussion in that commit is suggesting me that it's better to implement the pretty method in Sinatra than using the one provided in Rack. Thoughts? |
This is tricky. Did rack master really make a breaking change? Are they going to make a major version change? (Sorry, I've not been following this issue, so I'm pretty ignorant about the situation. If nobody knows off the top of their head I'll go look for some answers myself). |
I think this might not be a public Rack API we're using here. Also, Rack will not have a major release any time soon. Though I don't think Rack officially follows semantic versioning (this is further complicated by the Rack version being related to the Rack specification version). |
Yes it is not public API and meant to change in future. We should instead do a custom implementation, instead of handling for different versions. |
else | ||
content_type = "text/html" | ||
body = pretty(env, e) | ||
exception_string = pretty(env, e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI pretty()
is not meant to be public so this may bite us again, but I'm ok with merging it for now.
Update ShowExceptions to suit latest rack master
Can anyone tell me when this will make it into a release? I get a lot of breaking specs from this |
Will cut a new release later this week or early next. |
Thanks, appreciated! 👍 |
Is the new release far away? |
Will this be released soon? |
We're working on it. We have one potential blocker for the release: #721 |
Update ShowExceptions to suit latest rack master
the HTML error markup, implemented in Rack::ShowExceptions, returns a
String instead of an Array. This change uses Array() to
convert the exception string in both plain text and HTML modes
to an array.