as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

throwIfError

throwIfError(statusCode, errorMessage): void

Function to parse the numeric status code provided and throw the appropriate error if it is a failure code.

Parameters

statusCode

number

The status code.

errorMessage

undefined string

Returns

void

Throws

InternalError, IllegalStateError, StorageLimitError


Last updated: Sep 30, 2025