Skip to Content
DevelopersError CodesCodesRPCBaseQuery contract failed

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_query error).

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.contractError when available.
  • Include the query signature in meta.via for 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
Docsv1.0.10