Package dev.openfga.sdk.errors
Class HttpStatusCode
- java.lang.Object
-
- dev.openfga.sdk.errors.HttpStatusCode
-
public class HttpStatusCode extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intBAD_REQUESTstatic intFORBIDDENstatic intNOT_FOUNDstatic intNOT_IMPLEMENTEDstatic intTOO_MANY_REQUESTSstatic intUNAUTHORIZEDstatic intUNPROCESSABLE_ENTITY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisRetryable(int statusCode)Returns true for an HTTP status code that could reasonably be retried.static booleanisServerError(int statusCode)Returns true for any 5XX HTTP status code.static booleanisSuccessful(int statusCode)Returns true for any 2XX HTTP status code.
-
-
-
Field Detail
-
BAD_REQUEST
public static final int BAD_REQUEST
- See Also:
- Constant Field Values
-
UNAUTHORIZED
public static final int UNAUTHORIZED
- See Also:
- Constant Field Values
-
FORBIDDEN
public static final int FORBIDDEN
- See Also:
- Constant Field Values
-
NOT_FOUND
public static final int NOT_FOUND
- See Also:
- Constant Field Values
-
UNPROCESSABLE_ENTITY
public static final int UNPROCESSABLE_ENTITY
- See Also:
- Constant Field Values
-
TOO_MANY_REQUESTS
public static final int TOO_MANY_REQUESTS
- See Also:
- Constant Field Values
-
NOT_IMPLEMENTED
public static final int NOT_IMPLEMENTED
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSuccessful
public static boolean isSuccessful(int statusCode)
Returns true for any 2XX HTTP status code.
-
isServerError
public static boolean isServerError(int statusCode)
Returns true for any 5XX HTTP status code.
-
isRetryable
public static boolean isRetryable(int statusCode)
Returns true for an HTTP status code that could reasonably be retried.
-
-