Commit ed400251 authored by Georg Mittendorfer's avatar Georg Mittendorfer

Make POW check log less verbose.

parent 56fa90f9
Pipeline #49562917 failed with stage
in 3 minutes and 21 seconds
......@@ -212,18 +212,19 @@ public class IriApiHandler {
String validationTarget = logger.isDebugEnabled()
? String.valueOf(wex.getTarget())
: StringUtils.abbreviate(String.valueOf(wex.getTarget()), 116);"Validation failure: [{}]", validationTarget);;
if (isUnauthorizedIriCommand(wex.getTarget())) {
// return unauthorized instead of bad request like IRI does it
logger.debug("Received invalid unauthorized [{}] request. Returning 401...", ((IriCommand) wex.getTarget()).getCommand());"Received invalid unauthorized request [{}]. Returning 401...", validationTarget);;
return createUnauthorizedResponse((IriCommand) wex.getTarget());
} else if (isEmptyAttachToTangle(wex.getTarget())) {
logger.debug("Received empty AttachToTangle. Returning POW enabled response (400)...");"Received empty AttachToTangle (POW check). Returning 400...");
// exactly this response is needed for pow check
return invalidCommandResponse();
} else {"Validation failure: [{}]", validationTarget);;
// this is not 100% compatible with IRI as the error message is much more detailed. If this
// is a problem change to invalidCommandResponse
throw ExceptionHandlerUtil.convertToResponseException(wex, errorMessage);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment