NAME
DBIO::GraphQL::Error - Client errors of DBIO::GraphQL and the error envelope around resolvers
VERSION
version 0.900007
METHODS
client_error
die client_error("page 'take' must be >= 1");
Builds a client error to die with: the message reaches the client unchanged. It names keys, columns and options, never values. A trailing newline is dropped.
message
The text of the client error.
guard
my $resolve = DBIO::GraphQL::Error->guard($resolve, $on_error);
Wraps a resolver in the error envelope. A client error passes through as it is. A DBIO::Exception::Server whose SQLSTATE is 23505, 23503, 23502 or 23514 becomes UNIQUE_VIOLATION, FOREIGN_KEY_VIOLATION, NOT_NULL_VIOLATION or CHECK_VIOLATION in extensions.code, with a fixed message. Everything else becomes INTERNAL_ERROR, message internal error, with a extensions.correlation_id; the exception and the id go to the $on_error code reference, or without one to warn.
AUTHOR
DBIO Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.