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

Usage

1
const canva = window.canva.init();
2
3
canva.onReady(async (opts) => {
4
// Reports an error to Canva
5
canva.reportError("GENERAL_ERROR");
6
});
Copied!

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
1
type ErrorType =
2
| "GENERAL_ERROR"
3
| "INVALID_INPUT_MEDIA"
4
| "OPERATION_NOT_ALLOWED"
5
| "OUT_OF_MEMORY"
6
| "UNSUPPORTED_BROWSER"
7
| "UNSUPPORTED_DEVICE";
Copied!
Properties
Name
"GENERAL_ERROR"
"INVALID_INPUT_MEDIA"
"OPERATION_NOT_ALLOWED"
"OUT_OF_MEMORY"
"UNSUPPORTED_BROWSER"
"UNSUPPORTED_DEVICE"
Last modified 1mo ago