When the SDK, BaaS-REST gateway, or MYTF returns an error, use the tables below to identify the cause and resolve it. Each table covers one layer of the stack:
SDK error codes — errors raised in the client SDK before or during communication with BaaS-REST
BaaS-REST error codes — errors returned by the BaaS-REST gateway while forwarding requests to MYTF
MYTF error codes — errors returned by MYTF while processing your request
Each table has four columns:
| Column | What it contains |
|---|---|
| Error code | The symbolic constant you reference in code (for example, SDK_NULL_ERROR) |
| Error code value | The numeric value returned at runtime (hex or decimal) |
| Error message | The literal string included in the error response |
| Description | Root cause and recommended fix |
SDK error codes
The SDK raises these errors while running locally or communicating with the BaaS-REST gateway.
| Error code | Error code value | Error message | Description |
|---|---|---|---|
SUCCESS | 0 | Success | Success. |
SDK_NULL_ERROR | 0x5000 | The return value is null error | A required parameter is empty. Check the error message for the specific field. |
SDK_CONFIG_ERROR | 0x5001 | Failed to reading configuration file | The configuration file is missing or contains invalid values. Verify the file path and syntax. |
SDK_READ_FILE_ERROR | 0x5002 | Failed to get file input stream | The local file could not be opened. Check that the file path is correct and the file exists. |
SDK_ENCODING_FAILED | 0x5003 | Encoding error | Encoding failed. Contact your administrator. |
SDK_DECODING_FAILED | 0x5004 | Decoding error | Decoding failed. Contact your administrator. |
SDK_PARSE_ERROR | 0x5005 | Failed to parsing data | Data parsing failed. Check that the data format matches the expected schema. |
SDK_AUTH_DATA_ERROR | 0x5010 | authorize data is invalid | The authorization data is incorrect. Verify your credentials and authorization payload. |
SDK_INVALID_KEYPAIR | 0x5100 | The keypair is invalid | The key pair format is invalid. Check that the key pair was generated using the correct algorithm and format. |
SDK_GENERATE_KEY_ERROR | 0x5101 | Key generation error | Local key generation failed. Check the local SDK configuration. |
SDK_BUILD_ENVELOPE_ERROR | 0x5102 | Envelope seal error | Envelope encryption failed. Verify that the key pair was generated correctly. |
SDK_DECRYPT_ENVELOPE_ERROR | 0x5103 | Envelope open error | Envelope decryption failed. Verify that the key pair was generated correctly. |
SDK_ENCRYPT_ERROR | 0x5104 | Encryption error | Encryption failed. Verify that the key pair was generated correctly. |
SDK_DECRYPT_ERROR | 0x5105 | Decryption error | Decryption failed. Verify that the key pair was generated correctly. |
SDK_SIGN_MESSAGE_FAILED | 0x5106 | Failed to sign a message | Message signing failed. Verify that the key pair was generated correctly. |
SDK_VERIFY_SIGNATURE_FAILED | 0x5107 | The signature is invalid | Signature verification failed. Call getMYTFInfo and getTAPPInfo again to get the latest MYTFInfo and TAPPInfo, then update the local MYTF and TAPP signing public keys. |
SDK_VERIFY_TRUSTROOT_FAILED | 0x5108 | Failed to verify trust root | Trust root verification failed. Check that the trust root information is correct. |
SDK_VERIFY_HASH_FAILED | 0x5109 | The hash is not equal to the expected hash | Hash validation failed. Contact your administrator. |
SDK_INVALID_CURVE | 0x510A | curve type not supported | The specified elliptic curve is not supported by this algorithm. |
SDK_INVALID_REQ_PARAMETER | 0x5200 | Request parameters are invalid | A request parameter is invalid. Check each parameter value against the API reference. |
SDK_UNSUPPORT_ENGINE_TYPE_FAILED | 0x5201 | Unsupported execution engine type | The execution engine type is not supported. Verify that the engine type is set to WASM. |
SDK_BAAS_REST_HANDSHAKING_FAILED | 0x5202 | Failed to Handshake with BaaS's REST API | Handshake with the BaaS-REST gateway failed. Check the BaaS-REST endpoint and configuration. |
SDK_BAAS_REST_MYTFCALL_FAILED | 0x5203 | Failed to Call MYTF through BaaS's REST API | The MYTF call through BaaS-REST failed. Contact your administrator. |
BaaS-REST error codes
The BaaS-REST gateway returns these errors while forwarding your requests to MYTF.
| Error code | Error code value | Error message | Description |
|---|---|---|---|
BAAS_REST_SUCCESS | 200 | Success | Success. |
BAAS_REST_INVALID_ACCESS_TOKEN | 202 | Access token is null or expired | The access token is incorrect or has expired. Restart the client to get a new access token. |
BAAS_REST_INVALID_REQUEST | 400 | Access Deny | The user does not have permission to access MYTF resources. Check the domain and region configuration. |
BAAS_REST_DOMAIN_REGION_ERROR | 404 | Cannot find MYTF for this domain or region | The C3S domain or region was not found. Check that the domain and region values in your configuration are correct. |
BAAS_REST_THROW_EXCEPTION_ERROR | 500 | Unknown Error | An unknown error occurred. The service may be temporarily unavailable due to a timeout or an ongoing update. Retry the request. |
MYTF error codes
MYTF returns these errors while processing your request.
| Error code | Error code value | Error message | Description |
|---|---|---|---|
MYTF_SUCCESS | 0x0000 | success | Success. |
TAPP_REQ_EXCEED_LIMIT | 0x2002 | tapp request exceed limit | The request body exceeds the TAPP size limit. Reduce the payload size and retry. |
TAPP_REQ_HEADER_NOT_MATCH | 0x2003 | tapp request header and body not match | The TAPP request header and body are mismatched. Contact your administrator. |
TAPP_RES_EXCEED_LIMIT | 0x2004 | tapp response exceed limit | The TAPP response exceeds the size limit. Reduce the response payload in your contract logic. |
TAPP_INVALID_ENC_PK_ERROR | 0x2006 | invalid user pk | The encryption public key is invalid. Check the public key format. |
TAPP_NON_EXIST_ERROR | 0x2007 | tapp does not exist | The TAPP was not found. Verify that the TAPP was installed successfully and that the TAPP ID is correct. |
TAPP_EXISTED_ERROR | 0x2008 | tapp already existed | A TAPP with this ID already exists and cannot be reinstalled. Use a different TAPP ID. |
TAPP_INVALID_ID | 0x2009 | invalid id format | The TAPP ID is invalid. Check the ID length and character set. |
TAPP_INVALID_VERSION | 0x200A | invalid tapp version | The TAPP version is too low. Upgrade to a supported version. |
TAPP_INVALID_BYTECODE | 0x200B | invalid tapp bytecode | The TAPP contract bytecode is invalid. Check the compiler version and verify that the bytecode size is within limits. |
TAPP_INVALID_PROPERTY | 0x200C | invalid tapp properties | The TAPP extension properties are invalid. Check that the extension properties do not exceed the size limit. |
TAPP_INVALID_DESCRIPTION | 0x200D | invalid tapp description | The TAPP description is invalid. Check that the description does not exceed the size limit. |
TAPP_INVALID_ENGINE | 0x200E | invalid tapp exec engine | The TAPP execution engine is not supported. Check the specified engine type. |
TAPP_INVALID_METHOD | 0x200F | invalid tapp method | The execution method is invalid. Verify that the contract includes this method. |
TAPP_INVALID_ARGS | 0x2010 | invalid tapp args | The TAPP runtime parameters are invalid. Check that the input parameters match the contract's expected types and values. |
TAPP_EXCEED_LIMIT | 0x2011 | tapp number exceed max limit | The number of server-side TAPPs has reached the limit. Contact your administrator to increase the limit. |
TAPP_VM_CREATE_FAILED | 0x2100 | create exe engine failed | Execution engine initialization failed. Contact your administrator. |
TAPP_WASM_INIT_FAILED | 0x2101 | init wasm failed | WebAssembly (Wasm) virtual machine initialization failed. Check the compiler version. |
TAPP_WASM_EXEC_FAILED | 0x2102 | no wasm function | TAPP execution failed. Contact your administrator. |
TAPP_WASM_EXEC_INTERRUPTED | 0x2103 | execute wasm interrupted | TAPP execution was interrupted by an exception. Contact your administrator. |
EXT_INVALID_TYPE_ERROR | 0x2200 | invalid ext service type | The external service type is not recognized. Check that you specified a supported service type. |
EXT_NON_EXIST_ERROR | 0x2201 | ext service does not exist | The external service was not found. Verify that the service is registered and the identifier is correct. |
EXT_CONNECTION_ERROR | 0x2202 | not able to connect to ext service | Connection to the external service failed. Check that the service is reachable and the connection configuration is correct. |
OS_UNKNOWN_ERROR | 0x4000 | Oracle service unknown error | An unknown error occurred in the Oracle service. Contact your administrator. |
OS_DOMAIN_REGION_DOES_NOT_EXIST | 0x4001 | Domain or region does not exist | The domain name or region name in your configuration does not exist. Check the domain and region values. |
OS_GRPC_REQ_TIMEOUT | 0x4002 | grpc request timeout | The gRPC request timed out because the computation took too long. Simplify the request or contact your administrator if the issue persists. |
OS_IDENTITY_DATA_ERROR | 0x4003 | invalid authorize data | Authorization failed. Verify your authorization data and credentials. |
OS_PERMISSION_DENY | 0x4004 | user does not have access privileges | Permission denied. Check that the user account has the required access privileges for this operation. |
OS_TAPP_MAX_LIMIT | 0x4005 | user installed tapp exceeds max limit | The number of TAPPs installed by this user has reached the limit. Contact your administrator to increase the limit. |
OS_TAPP_DELETED_ERROR | 0x4006 | same tapp already deleted | This TAPP has already been deleted. |