/** * Returns all non hidden marked fields of this exception. * * @return a JSON object representation of this exception including only non hidden marked fields. */ @Override public JsonObject toJson() { return toJson(FieldType.notHidden()); }
/** * Returns all non hidden marked fields of this exception. * * @return a JSON object representation of this exception including only non hidden marked fields. */ @Override public JsonObject toJson() { return toJson(FieldType.notHidden()); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set( ConnectivityCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set( ConnectivityCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(PolicyCommandResponse.JsonFields.JSON_POLICY_ID, policyId, predicate); jsonObjectBuilder.set(PolicyCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(ThingCommandResponse.JsonFields.JSON_THING_ID, thingId, predicate); jsonObjectBuilder.set(ThingCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(ThingCommandResponse.JsonFields.JSON_THING_ID, thingId, predicate); jsonObjectBuilder.set(ThingCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
@Override protected void appendPayload(final JsonObjectBuilder jsonObjectBuilder, final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate) { final Predicate<JsonField> predicate = schemaVersion.and(thePredicate); jsonObjectBuilder.set(PolicyCommandResponse.JsonFields.JSON_POLICY_ID, policyId, predicate); jsonObjectBuilder.set(PolicyCommandResponse.JsonFields.PAYLOAD, dittoRuntimeException.toJson(schemaVersion, thePredicate), predicate); }
private void handleDittoRuntimeException(final DittoRuntimeException dittoRuntimeException) { LogUtil.enhanceLogWithCorrelationId(log, dittoRuntimeException); log.warning("Received DittoRuntimeException {} from {}: {}", dittoRuntimeException.getClass().getName(), getSender(), dittoRuntimeException); addCommandResponse(DevOpsErrorResponse.of(null, null, dittoRuntimeException.toJson(), dittoRuntimeException.getDittoHeaders())); }
private void handleDittoRuntimeException(final DittoRuntimeException dittoRuntimeException) { LogUtil.enhanceLogWithCorrelationId(log, dittoRuntimeException); log.warning("Received DittoRuntimeException {} from {}: {}", dittoRuntimeException.getClass().getName(), getSender(), dittoRuntimeException); addCommandResponse(DevOpsErrorResponse.of(null, null, dittoRuntimeException.toJson(), dittoRuntimeException.getDittoHeaders())); }
dittoRuntimeException -> onError.accept(errorResponse(command, dittoRuntimeException.toJson())));