Links

reportError

API reference for the "reportError" method.
Reports an error to Canva. This method does not produce any visible output.

Usage

const canva = window.canva.init();
canva.onReady(async (opts) => {
// Reports an error to Canva
canva.reportError("GENERAL_ERROR");
});

Parameters

Name
Type
Required
Description
errorType
ErrorType
Yes
An error code that describes what went wrong.

Returns

void

Types

ErrorType

An error code that describes what went wrong.
Signature
type ErrorType =
| "GENERAL_ERROR"
| "INVALID_INPUT_MEDIA"
| "OPERATION_NOT_ALLOWED"
| "OUT_OF_MEMORY"
| "UNSUPPORTED_BROWSER"
| "UNSUPPORTED_DEVICE";
Properties
Name
"GENERAL_ERROR"
"INVALID_INPUT_MEDIA"
"OPERATION_NOT_ALLOWED"
"OUT_OF_MEMORY"
"UNSUPPORTED_BROWSER"
"UNSUPPORTED_DEVICE"