MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / handleAuthorization

Method handleAuthorization

src/tsd/QueryRpc.java:866–884  ·  view source on GitHub ↗
(AuthState state)

Source from the content-addressed store, hash-verified

864 }
865
866 private void handleAuthorization(AuthState state) {
867 switch (state.getStatus()) {
868 case SUCCESS:
869 // cary on :)
870 break;
871 case UNAUTHORIZED:
872 query_unauthorized.incrementAndGet();
873 throw new BadRequestException(HttpResponseStatus.UNAUTHORIZED,
874 state.getMessage());
875 case FORBIDDEN:
876 query_forbidden.incrementAndGet();
877 throw new BadRequestException(HttpResponseStatus.FORBIDDEN,
878 state.getMessage());
879 default:
880 query_exceptions.incrementAndGet();
881 throw new BadRequestException(HttpResponseStatus.INTERNAL_SERVER_ERROR,
882 state.getMessage());
883 }
884 }
885
886 /**
887 * Parse the "percentile" section of the query string and returns an list of

Callers 1

checkAuthorizationMethod · 0.95

Calls 2

getStatusMethod · 0.65
getMessageMethod · 0.65

Tested by

no test coverage detected