Skip to content

Commit

Permalink
Set X-Opensuse-Errorcode for pundit errors
Browse files Browse the repository at this point in the history
As we do in ApplicationController#render_error
  • Loading branch information
hennevogel committed Mar 27, 2024
1 parent 599e101 commit cbfcf8a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module RescueAuthorizationHandler
format.any do
@errorcode = authorization_errorcode(exception)
@summary = authorization_message(exception)
response.headers['X-Opensuse-Errorcode'] = @errorcode
render template: 'status', status: :forbidden, formats: [:xml]
end
end
Expand Down

0 comments on commit cbfcf8a

Please sign in to comment.