@Override public String getManifest() { return getErrorCode(); }
@Override public String getManifest() { return getErrorCode(); }
private void logDittoRuntimeException(final DittoRuntimeException exception) { LogUtil.enhanceLogWithCorrelationId(log, exception); final String msgTemplate = "Got DittoRuntimeException '{}' when command via AMQP was processed: {}"; log.info(msgTemplate, exception.getErrorCode(), exception.getMessage()); }
private void logDittoRuntimeException(final DittoRuntimeException dre) { if (dre.getDittoHeaders().getCorrelationId().isPresent()) { LogUtil.enhanceLogWithCorrelationId(logger, dre); } logger.info("DittoRuntimeException '{}': {}", dre.getErrorCode(), dre.getMessage()); }
public DittoRuntimeAssert hasErrorCode(final String expectedErrorCode) { isNotNull(); final String actualErrorCode = actual.getErrorCode(); assertThat(actualErrorCode) // .overridingErrorMessage("Expected error code of DittoRuntimeException to be \n<%s> but it was \n<%s>", expectedErrorCode, actualErrorCode) // .isEqualTo(expectedErrorCode); return this; }
public ErrorResponseAssert dittoRuntimeExceptionHasErrorCode(final String expectedErrorCode) { isNotNull(); final DittoRuntimeException dittoRuntimeException = actual.getDittoRuntimeException(); final String actualErrorCode = dittoRuntimeException.getErrorCode(); Assertions.assertThat(actualErrorCode) .overridingErrorMessage( "Expected DittoRuntimeException of Thing Error Response to have error code \n<%s> but it " + "had \n<%s>", expectedErrorCode, actualErrorCode) .isEqualTo(expectedErrorCode); return this; }
public ThingErrorResponseAssert dittoRuntimeExceptionHasErrorCode(final String expectedErrorCode) { isNotNull(); final DittoRuntimeException dittoRuntimeException = actual.getDittoRuntimeException(); final String actualErrorCode = dittoRuntimeException.getErrorCode(); Assertions.assertThat(actualErrorCode) .overridingErrorMessage( "Expected DittoRuntimeException of Thing Error Response to have error code \n<%s> but it " + "had \n<%s>", expectedErrorCode, actualErrorCode) .isEqualTo(expectedErrorCode); return this; }
private void handleDittoRuntimeException(final DittoRuntimeException exception, final Map<String, String> dittoHeaders) { final ThingErrorResponse errorResponse = ThingErrorResponse.of(exception, DittoHeaders.newBuilder(exception.getDittoHeaders()) .putHeaders(dittoHeaders) .build()); enhanceLogUtil(exception); final String stackTrace = stackTraceAsString(exception); log.info("Got DittoRuntimeException '{}' when ExternalMessage was processed: {} - {}. StackTrace: {}", exception.getErrorCode(), exception.getMessage(), exception.getDescription().orElse(""), stackTrace); handleCommandResponse(errorResponse); }
private void handleDittoRuntimeException(final DittoRuntimeException exception, final Map<String, String> dittoHeaders) { final ThingErrorResponse errorResponse = ThingErrorResponse.of(exception, DittoHeaders.newBuilder(exception.getDittoHeaders()) .putHeaders(dittoHeaders) .build()); enhanceLogUtil(exception); final String stackTrace = stackTraceAsString(exception); log.info("Got DittoRuntimeException '{}' when ExternalMessage was processed: {} - {}. StackTrace: {}", exception.getErrorCode(), exception.getMessage(), exception.getDescription().orElse(""), stackTrace); handleCommandResponse(errorResponse); }
log.info("Got DittoRuntimeException '{}' when command was parsed: {}", e.getErrorCode(), e.getMessage()); if (headers != null) {
log.info("Got DittoRuntimeException '{}' when command was parsed: {}", e.getErrorCode(), e.getMessage()); if (headers != null) {
return command.setDittoHeaders(dittoHeaders); } catch (final DittoRuntimeException e) { log.info("Got DittoRuntimeException '{}' when command was parsed: {}", e.getErrorCode(), e.getMessage()); return null; } catch (final Exception e) {
log.error(e, "DittoRuntimeException '{}' should not be escalated to RootActor. Simply resuming Actor.", e.getErrorCode()); return SupervisorStrategy.resume(); }).match(Throwable.class, e -> {
log.error(e, "DittoRuntimeException '{}' should not be escalated to RootActor. Simply resuming Actor.", e.getErrorCode()); return SupervisorStrategy.resume(); }).match(Throwable.class, e -> {