/** * Gets an AMQP {@link ErrorCondition} based on this exception's error and description. * * @return The condition. */ public ErrorCondition asErrorCondition() { return ProtonHelper.condition(error.toString(), getMessage()); } }
formalCheck.complete(); } else { formalCheck.fail(new AmqpErrorException(AmqpError.DECODE_ERROR, "malformed payload")); .failedFuture(new AmqpErrorException(AmqpError.ILLEGAL_STATE, "unsubscribed reply-to address")); } catch (final DecodeException e) { return Future .failedFuture(new AmqpErrorException(AmqpError.DECODE_ERROR, "malformed payload")); .failedFuture(new AmqpErrorException(AmqpError.UNAUTHORIZED_ACCESS, "unauthorized")); MessageHelper.rejected(delivery, cause.asErrorCondition()); } else { logger.debug("error processing request [resource: {}, op: {}]: {}", targetAddress,
formalCheck.complete(); } else { formalCheck.fail(new AmqpErrorException(AmqpError.DECODE_ERROR, "malformed payload")); .failedFuture(new AmqpErrorException(AmqpError.ILLEGAL_STATE, "unsubscribed reply-to address")); } catch (final DecodeException e) { return Future .failedFuture(new AmqpErrorException(AmqpError.DECODE_ERROR, "malformed payload")); .failedFuture(new AmqpErrorException(AmqpError.UNAUTHORIZED_ACCESS, "unauthorized")); MessageHelper.rejected(delivery, cause.asErrorCondition()); } else { logger.debug("error processing request [resource: {}, op: {}]: {}", targetAddress,
/** * Gets an AMQP {@link ErrorCondition} based on this exception's error and description. * * @return The condition. */ public ErrorCondition asErrorCondition() { return ProtonHelper.condition(error.toString(), getMessage()); } }