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

Access Control

SenderNotAllowedForHandle

error SenderNotAllowedForHandle(bytes32 handle, address sender);
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

error SharerNotAllowedForHandle(bytes32 handle, address sharer);
The sharer does not hold permission on this handle and therefore cannot delegate access to others.

HandleAlreadyExists

error HandleAlreadyExists(bytes32 handle);
An attempt was made to register a handle that already exists in the access control list.

ProofVerificationFailed

error ProofVerificationFailed(address verifyingContract, bytes4 callFunction, bytes argData);
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.

InvalidVoucherSignature

error InvalidVoucherSignature(address signer, bytes32 digest, bytes signature);
The allowance voucher signature does not match the sharer’s address.

InvalidVoucherSessionNonce

error InvalidVoucherSessionNonce(bytes32 providedSessionNonce, bytes32 activeSessionNonce);
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

error InvalidVerifyingContract();
The voucher specifies a zero-address verifying contract, which is not allowed.

Encrypted Input

InvalidInputVersion

error InvalidInputVersion(uint16 version);
The ciphertext input uses an unsupported version number.

InputLengthTooShort

error InputLengthTooShort(uint256 length);
The input bytes are too short to be a valid encrypted input.

ExternalHandleDoesNotMatchComputedHandle

error ExternalHandleDoesNotMatchComputedHandle(
    bytes32 externalHandle,
    bytes32 computedHandle,
    uint256 chainId,
    address aclAddress,
    address userAddress,
    address contractAddress,
    uint16 version
);
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

error 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

error InvalidTEEAttestation();
The attestation signatures are invalid or fail TEE verification.

UnexpectedDecryptedValue

error UnexpectedDecryptedValue();
The decrypted value does not match the expected value in a computation attestation.

AttestationsSignaturesLengthMismatch

error AttestationsSignaturesLengthMismatch(uint256 attestationsLength, uint256 signaturesLength);
The attestations and signatures arrays passed to a batch verification call have different lengths.

EList Operations

IndexOutOfRange

error IndexOutOfRange(uint16 i, uint16 len);
An index access on an elist is beyond the list bounds.

SliceOutOfRange

error SliceOutOfRange(uint16 start, uint16 end, uint16 len);
The requested slice boundaries exceed the list length.

InvalidRange

error InvalidRange(uint16 start, uint16 end);
The start index is greater than or equal to the end index.

ZeroLength

error ZeroLength();
An operation that requires a non-empty list received an empty one.

ListTooLong

error ListTooLong(uint32 provided, uint16 max);
The list exceeds the maximum allowed length.

ListTypeMismatch

error ListTypeMismatch(ETypes lhs, ETypes rhs);
Two lists have incompatible element types (for example, concatenating a Uint256 list with a Bool list).

UnsupportedListType

error UnsupportedListType(ETypes listType);
The specified element type is not supported for this elist operation.

Type System

UnsupportedType

error UnsupportedType(ETypes actual);
The handle type is not supported for this operation.

UnexpectedType

error UnexpectedType(ETypes actual, bytes32 expectedTypes);
The handle type does not match any of the expected types. expectedTypes is a bitmask of the valid types.

SameTypeCast

error SameTypeCast(ETypes t);
A cast was attempted from a type to itself. Use a different target type.

Fees

FeeNotPaid

error 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

error FeeWithdrawalFailed();
The ETH transfer during fee withdrawal failed.

NoFeesToWithdraw

error NoFeesToWithdraw();
A withdrawal was attempted when there are no accumulated fees available.

ETH Transfer

EthInboundTransferUnsupported

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

RefundFailed

error RefundFailed();
An ETH refund transfer back to the caller failed.

ReentrantCall

error ReentrantCall();
A reentrant call was detected and blocked.