request_handler icon indicating copy to clipboard operation
request_handler copied to clipboard

Handle parse errors

Open jan4843 opened this issue 5 years ago • 1 comments

Requests where the body is not valid JSON would cause MultiJson::ParseError to be raised but not translated to a RequestHandler error. Handling RequestHandler::ExternalBaseError should arguably include parsing errors caused by invalid user input.

jan4843 avatar Jun 24 '20 09:06 jan4843

Codecov Report

Merging #47 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   98.19%   98.20%           
=======================================
  Files          41       41           
  Lines         887      889    +2     
=======================================
+ Hits          871      873    +2     
  Misses         16       16           
Impacted Files Coverage Δ
lib/request_handler/body_parser.rb 100.00% <100.00%> (ø)
lib/request_handler/error.rb 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 80a6d77...ab80ff4. Read the comment docs.

codecov-commenter avatar Jun 25 '20 07:06 codecov-commenter