-
- All Implemented Interfaces:
public class HttpException.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpExceptionCANCELLEDpublic final static HttpException.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final HttpExceptioninvoke(Integer statusCode, MediaType mediaType, ByteArray body)Creates an HTTP error from a status code. final HttpExceptionwrap(Throwable cause)Creates an HTTP error from a generic exception. final HttpExceptiongetCANCELLED()Shortcut for a cancelled HTTP error. -
-
Method Detail
-
invoke
final HttpException invoke(Integer statusCode, MediaType mediaType, ByteArray body)
Creates an HTTP error from a status code.
Returns null if the status code is a success.
-
wrap
final HttpException wrap(Throwable cause)
Creates an HTTP error from a generic exception.
-
getCANCELLED
final HttpException getCANCELLED()
Shortcut for a cancelled HTTP error.
-
-
-
-