cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

allow Authenticators to throw ServiceException #59

Closed tangiel closed 7 years ago

tangiel commented 7 years ago

This feature request lets Authenticators throw ServiceExcpetions, which are then written in the standard JSON format. This change also refactors exception handling when calling an API method to clean up the logic a bit, and change the logging level so that 5xx-level ServiceExceptions log at the WARNING level, and others at INFO.

codecov-io commented 7 years ago

Codecov Report

Merging #59 into master will increase coverage by 0.07%. The diff coverage is 53.84%.

@@             Coverage Diff              @@
##             master      #59      +/-   ##
============================================
+ Coverage     79.68%   79.75%   +0.07%     
+ Complexity     1622     1619       -3     
============================================
  Files           154      154              
  Lines          5438     5428      -10     
  Branches        700      698       -2     
============================================
- Hits           4333     4329       -4     
+ Misses          832      827       -5     
+ Partials        273      272       -1
Impacted Files Coverage Δ Complexity Δ
.../server/spi/request/ServletRequestParamReader.java 84.87% <ø> (ø) 22 <0> (ø) :x:
...n/java/com/google/api/server/spi/request/Auth.java 77.5% <ø> (ø) 10 <0> (ø) :x:
...ver/spi/request/RestServletRequestParamReader.java 92.59% <ø> (ø) 21 <0> (ø) :x:
.../java/com/google/api/server/spi/SystemService.java 83.5% <53.84%> (+1.23%) 37 <6> (+1) :white_check_mark:
...oogle/api/server/spi/handlers/ExplorerHandler.java 100% <0%> (+23.07%) 3% <0%> (-4%) :x:

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 0cd4fe7...2653cc9. Read the comment docs.