Query contract failed
Code
RPC/BASE/QUERY_CONTRACT_FAILED
What it means
The query reached the chain/VM, but the VM returned a failure for the contract query.
When it happens
- The chain/VM reports an error for a contract query (e.g.
abci_queryerror).
Typical scenarios:
- Query arguments are invalid for the contract function
- The contract rejects the query (authorization, missing state, invalid realm slug/id)
- Node/VM returns an execution error
How to handle
- Log
meta.contractErrorwhen available. - Include the query signature in
meta.viafor traceability.
Example
import { AppError, AppErrorCodes } from '@aina/shared-common';
throw new AppError({
code: AppErrorCodes.RPC.BASE_QUERY_CONTRACT_FAILED,
message: 'Query contract call failed',
status: 500,
meta: {
via: ['rpc.base.query', 'gno.land/r/akkadia/personal_world.GetWorldBySlug'],
params: {
/* safe args */
},
contractError: '...'
}
});Last updated on