File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
api/src/main/java/com/redhat/insights
runtime/src/main/java/com/redhat/insights/core/httpclient Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ public enum InsightsErrorCode {
2929 ERROR_CLIENT_FAILED (19 ),
3030 ERROR_CLIENT_BACKOFF_RETRIES_FAILED (20 ),
3131 ERROR_INTERRUPTED_THREAD (21 ),
32- ;
32+ ERROR_HTTP_SEND_FORBIDDEN (22 ),
33+ ERROR_HTTP_SEND_CLIENT_ERROR (23 );
3334
3435 private static final String PREFIX = "I4ASR" ;
3536 private final int code ;
Original file line number Diff line number Diff line change @@ -162,13 +162,18 @@ protected void sendInsightsReportWithClient(
162162 case 401 :
163163 throw new InsightsException (
164164 ERROR_HTTP_SEND_AUTH_ERROR , "Authentication missing from request" );
165+ case 403 :
166+ throw new InsightsException (ERROR_HTTP_SEND_FORBIDDEN , "Forbidden" );
165167 case 413 :
166168 throw new InsightsException (ERROR_HTTP_SEND_PAYLOAD , "Payload too large" );
167169 case 415 :
168- default :
169170 throw new InsightsException (
170171 ERROR_HTTP_SEND_INVALID_CONTENT_TYPE ,
171172 "Content type of payload is unsupported" );
173+ default :
174+ throw new InsightsException (
175+ ERROR_HTTP_SEND_CLIENT_ERROR ,
176+ "Client error with HTTP status code " + statusCode );
172177 }
173178 case 5 :
174179 default :
You can’t perform that action at this time.
0 commit comments