Skip to content

Commit

Permalink
[Confirm] Log GraphQL errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
neprune committed Dec 3, 2024
1 parent c7a0236 commit df9c31a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion perllib/Integrations/Confirm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,18 @@ sub perform_request_graphql {
my $body = {
query => $query,
};
my $encoded_body = encode_json($body);

$request->content(encode_json($body));
$request->content($encoded_body);

my $response = $self->ua->request($request);

my $content = decode_json($response->content);

if ($content->{errors}) {
$self->logger->warn("Got errors in response to GraphQL query $encoded_body: " . $response->content);
}

return $content;
}

Expand Down

0 comments on commit df9c31a

Please sign in to comment.