-
Notifications
You must be signed in to change notification settings - Fork 437
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
Support for Flame framework #454
Comments
Can you elaborate? BetterErrors is Rack middleware. |
I've read this. I've added this code: require "better_errors"
if ENV["RACK_ENV"] == "development"
use BetterErrors::Middleware
end And no changes, 500 is caught by Flame framework. I've asked about documentation for framework developers, mentioned documentation looks like for users (apps developers). |
If you're using a framework that rescues errors, then the error won't make it to the Better Errors middleware. I'm pretty sure that's what's happening here. The order of middleware is important; with Rails middleware, Better Errors has to place itself in just the right place in order to do its job. I'm not a Rack middleware expert unfortunately, but I'll try to find time to dig into it soon. |
Thank you! I'd glad to know how to place Better Errors in the right place. I'll try to do it later with my own Rack-based framework (Flame). Probably, it should work like:
And currently it may fails due to rescuing errors in web-framework (Flame) without re-raising: https://github.com/AlexWayfer/flame/blob/3792cbb04d46ca8ac92a0122d4e9f7e01cae2db9/lib/flame/dispatcher/routes.rb#L33-L39 I'll check it later. |
OK, I actually can integrate Small side question: why I see "no application frames available"? Can I improve this somehow? On what it depends? |
Application frames are determined based on |
Thank you, it seems working! I want to add Flame to the referenced documentation, if you'd allow, if so I suggest to leave this issue open and even you can assign it to me. Ability to integration of Flame with Better Errors will be in long-awaited 5 release (there are already RC versions). |
More info here: BetterErrors/better_errors#454 Example: ```ruby # config.ru require 'better_errors' use BetterErrors::Middleware BetterErrors.application_root = __dir__ ``` (I hope I'll not forget to add this to the wiki)
More info here: BetterErrors/better_errors#454 Example: ```ruby # config.ru require 'better_errors' use BetterErrors::Middleware BetterErrors.application_root = __dir__ ``` (I hope I'll not forget to add this to the wiki)
Hello!
I have the Flame framework (Rack-based).
And this gem does not work as middleware.
Can you please describe (add to documentation/wiki) what is required for integration? Like raising exception, or 500 status…
The text was updated successfully, but these errors were encountered: