-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Description
I think we are going to move forward with #2251 - at least for the moment. I believe for this scheme to fit a little nicer we'd likely have to make error partials that I believe (assume really) that Rails will just take care of choosing which one (json or html) based on the request.format.
So we'd potentially end up with something like this.
rescue_from AllowlistPolicy::Forbidden, with: :not_allowed_error
def not_allowed_error(error)
respond_to_error(status: :forbidden, error: error)
end
def respond_to_error(status: :internal_server_error, error: nil)
logger.error(error.message) unless error.nil?
@files = []
@error = error
render error, status: status
endAgain - I just think this is the case, I haven't put more work into it beyond investigating.
Originally posted by johrstrom in #2258 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Reviewed, Scheduled