There are two different styles for handling errors.
-If L</unpack> is 0 (off), every response -- whether success or failure -- is enveloped like this:
+If L</unpack> is 0 (off, the default), every response -- whether success or failure -- is enveloped
+like this:
{
data => {...},
my $data = eval { $graphql->execute(...) };
if (my $error = $@) {
+ my $resp = $error->{response};
# handle errors
}
else {