exception_handler icon indicating copy to clipboard operation
exception_handler copied to clipboard

Use verify_request_format! method to check valid request format

Open fpenapita opened this issue 5 years ago • 2 comments

This commit fix a problem to be able to render error responses for format distinct to html (for example json) because e.request.format is returning a Mime::Type object that doesn’t match with the values in self.class.respond_to that is a hash with keys :html, :json, etc

Using the responders’ verify_requested_format! we are getting exactly the same goal delegating the tasks in the own responders gem.

fpenapita avatar Sep 28 '20 22:09 fpenapita

Pull Request Test Coverage Report for Build 1565

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.8%) to 59.016%

Totals Coverage Status
Change from base Build 1563: -2.8%
Covered Lines: 72
Relevant Lines: 122

💛 - Coveralls

coveralls avatar Sep 28 '20 22:09 coveralls

Pull Request Test Coverage Report for Build 1565

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-2.8%) to 59.016%

Files with Coverage Reduction New Missed Lines %
lib/exception_handler/config.rb 1 77.78%
<!-- Total: 1
Totals Coverage Status
Change from base Build 1563: -2.8%
Covered Lines: 72
Relevant Lines: 122

💛 - Coveralls

coveralls avatar Sep 28 '20 22:09 coveralls