List of usage examples for io.netty.handler.codec.http HttpResponseStatus UNPROCESSABLE_ENTITY
HttpResponseStatus UNPROCESSABLE_ENTITY
To view the source code for io.netty.handler.codec.http HttpResponseStatus UNPROCESSABLE_ENTITY.
Click Source Link
From source file:io.apiman.gateway.vertx.api.ApiCatchHandler.java
License:Apache License
@Override public final void handle(Message<T> message) { try {//from w w w . j a v a 2s .co m handleApi(message); } catch (DecodeException e) { replyError(message, new GenericError(HttpResponseStatus.UNPROCESSABLE_ENTITY.code(), e.getLocalizedMessage(), e)); } catch (Exception e) { replyError(message, new GenericError(HttpResponseStatus.INTERNAL_SERVER_ERROR.code(), Messages.getString("ApiCatchHandler.0") + e.getLocalizedMessage(), e)); //$NON-NLS-1$ } }
From source file:net.udidb.server.api.resources.DebuggeeContexts.java
License:Open Source License
private void invalidJsonResponse(HttpServerResponse response, JsonProcessingException e) { logger.debug("Invalid JSON", e); response.setStatusCode(HttpResponseStatus.UNPROCESSABLE_ENTITY.code()).end(); }