Interface ErrorResponseBodyProvider<T>
- Type Parameters:
T- The body type
- All Known Subinterfaces:
HtmlErrorResponseBodyProvider,JsonErrorResponseBodyProvider<T>
public interface ErrorResponseBodyProvider<T>
Provides an HTTP Response body of an error response.
- Since:
- 4.7.0
-
Method Summary
Modifier and TypeMethodDescriptionbody(@NonNull ErrorContext errorContext, @NonNull io.micronaut.http.HttpResponse<?> response) @NonNull String
-
Method Details
-
body
@NonNull T body(@NonNull @NonNull ErrorContext errorContext, @NonNull @NonNull io.micronaut.http.HttpResponse<?> response) - Parameters:
errorContext- Error Contextresponse- Base HTTP Response- Returns:
- The HTTP Response Body
-
contentType
- Returns:
- The content type of the HTTP response
-