- if (my $exception = $f->failure) {
- if ($self->unpack || !$exception->{errors}) {
- return Future->fail($exception);
+ if (my ($exception, $category, @details) = $f->failure) {
+ if (!$exception->{errors}) {
+ return Future->fail($exception, $category, @details);
+ }
+ if ($self->unpack) {
+ return Future->fail($ERROR_MESSAGE, 'graphql', $exception, @details);