Skip to content

Commit

Permalink
answerJWT error handling add escape quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
drdrew42 committed Mar 27, 2023
1 parent 964aca4 commit 8e761d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/RenderApp/Controller/Render.pm
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ async sub problem {
elsif ($response->is_error) {
$answerJWTresponse->{message} = '[' . $c->logID . '] ' . $response->message;
}

$answerJWTresponse->{message} =~ s/"/\\"/g;
$answerJWTresponse->{message} =~ s/'/\'/g;
})->
catch(sub {
my $response = shift;
Expand All @@ -171,6 +168,9 @@ async sub problem {
$answerJWTresponse->{status} = 500;
$answerJWTresponse->{message} = '[' . $c->logID . '] ' . $response;
});

$answerJWTresponse->{message} =~ s/"/\\"/g;
$answerJWTresponse->{message} =~ s/'/\'/g;
$answerJWTresponse = encode_json($answerJWTresponse);
$c->log->info("answerJWT response ".$answerJWTresponse);

Expand Down

0 comments on commit 8e761d4

Please sign in to comment.