Skip to main content
This page lists every custom error that a dApp developer may encounter when building on Inco Lightning.

Access Control

SenderNotAllowedForHandle

The caller does not have read or use permission on this handle. Grant access first with e.allow(handle, address) or inco.allow(handle, address).

SharerNotAllowedForHandle

The sharer does not hold permission on this handle and therefore cannot delegate access to others.

HandleAlreadyExists

An attempt was made to register a handle that already exists in the access control list.

ProofVerificationFailed

The session verifier contract did not return ALLOWANCE_GRANTED_MAGIC_VALUE. The allowance proof failed — check that the voucher is valid and has not expired or been revoked.

InvalidVoucherWarning

Thrown when a voucher’s warning field does not match the required warning text

InvalidVoucherSignature

The allowance voucher signature does not match the sharer’s address.

InvalidVoucherSessionNonce

The voucher was signed under a session nonce that no longer matches the sharer’s active nonce. The voucher has been revoked via updateActiveVouchersSessionNonce.

InvalidVerifyingContract

The voucher specifies a zero-address verifying contract, which is not allowed.

Encrypted Input

InvalidInputVersion

The ciphertext input uses an unsupported version number.

InputLengthTooShort

The input bytes are too short to be a valid encrypted input.

ExternalHandleDoesNotMatchComputedHandle

The handle supplied by the user does not match the handle derived from the ciphertext content. This indicates the input data was constructed incorrectly or tampered with.

Decryption & Attestation

HandleMismatch

A decryption or computation attestation was submitted for a different handle than the one the contract expects. Always verify decryption.handle explicitly before accepting an attestation — see Best Practices.

InvalidTEEAttestation

The attestation signatures are invalid or fail TEE verification.

UnexpectedDecryptedValue

The decrypted value does not match the expected value in a computation attestation.

AttestationsSignaturesLengthMismatch

The attestations and signatures arrays passed to a batch verification call have different lengths.

EList Operations

IndexOutOfRange

An index access on an elist is beyond the list bounds.

SliceOutOfRange

The requested slice boundaries exceed the list length.

InvalidRange

The start index is greater than or equal to the end index.

ListRangeExceedsType

The end value of a range operation does not fit within the bit width of the specified list type.

ZeroLength

An operation that requires a non-empty list received an empty one.

ListTooLong

The list exceeds the maximum allowed length.

ListTypeMismatch

Two lists have incompatible element types (for example, concatenating a Uint256 list with a Bool list).

UnsupportedListType

The specified element type is not supported for this elist operation.

Type System

UnsupportedType

The handle type is not supported for this operation.

UnexpectedType

The handle type does not match any of the expected types. expectedTypes is a bitmask of the valid types.

SameTypeCast

A cast was attempted from a type to itself. Use a different target type.

Fees

FeeNotPaid

The msg.value sent with the transaction was insufficient to cover the required fee. Query inco.getFee() to determine the correct amount before calling.

FeeWithdrawalFailed

The ETH transfer during fee withdrawal failed.

NoFeesToWithdraw

A withdrawal was attempted when there are no accumulated fees available.

ETH Transfer

EthInboundTransferUnsupported

Plain ETH transfers directly to the IncoLightning contract are rejected. Always attach msg.value to a specific function call to pay fees.

RefundFailed

An ETH refund transfer back to the caller failed.

ReentrantCall

A reentrant call was detected and blocked.