public final class DefaultErrorOutcomes extends Object
Modifier and Type | Method and Description |
---|---|
static OutcomeBuilder |
errorOutcome(RequestHeader request, Status status, String title, String detail, Outcomes outcomes)
Build a default error outcome.
|
public static OutcomeBuilder errorOutcome(RequestHeader request, Status status, String title, String detail, Outcomes outcomes)
Respect content-type negociation to output a HTML, JSON or text/plain outcome.
request
- Request header or null, text/plain will be used if null
status
- Outcome status or null, 500 Internal Server Error will be used if null
title
- Error title or null/empty to use the status reason phrase
detail
- Error detail or null/empty if none
outcomes
- Outcomes factory, not null