Error codes
When a method in the Developers SDK throws an error, there's a limited range of possible error codes. This page lists all of the possible error codes that may appear in a CanvaError object.
bad_external_service_response
A response from an external service is invalid or malformed.
Example: When redirecting back to Canva at the end of an authentication flow, the URL is malformed.
bad_request
The app has made a request that’s invalid or malformed.
Example: The app calls a function without a required parameter.
failed_precondition
The app hasn’t met a precondition.
internal_error
There’s an error in the Developers SDK’s internal implementation.
Example: There's an underlying issue in Canva's backend.
not_allowed
The app is not allowed to perform the specified operation.
Example: The app tries to call the navigator.clipboard.write method, which has been disabled due to it not being cross-browser compatible.
not_found
The app can’t retrieve the specified resource.
Example: The app tries to operate on an asset reference that doesn't exist.
quota_exceeded
The app or user has exceeded their allocated quota for a resource or service.
Example: The app can't upload a file because the user is out of storage space.
permission_denied
The app doesn’t have sufficient permissions.
Example: The app tries to create an element without having sufficient permissions.
rate_limited
The app has made too many requests within a certain time period. The reference page for each API method includes a description of any rate limits. For example, the rate limit for requestExport.
Example: The app tries to create too many elements in a short period of time.
timeout
The operation exceeded the maximum allowed time to complete.
unsupported_surface
An API is called from an incompatible surface. A surface may be incompatible with an API for technical reasons or to avoid a confusing user experience.
Example: An app tries to open a font picker from an image overlay.
user_offline
The user is offline.
Example: The user tries to authenticate without being connected to the internet.