If a request error occurs when you use Object Storage Service (OSS) SDK for Node.js, an exception is thrown. Detailed information about the error is recorded in a log file. By default, the detailed information about the error is recorded in the oss_sdk.log file.
ClientErrors indicate exceptions occurred inside the SDK. For example, parameter setting errors and errors occurred when objects are modified in the resumable upload or download process.
RequestErrors are thrown by SDK for Node.js when an interruption or exception occurs on the network. Check the network connectivity and make sure that the network is resumed before you use OSS SDK for Node.js again.
- Status: the HTTP status code of the error request.
- Code: the OSS error code.
- Message: the OSS error message.
- RequestId: the UUID of the request. If the error persists, you can provide the request ID to seek help from technical support.
For more information about common error messages in OSS, see Error responses.
If ClientErrors or ServerErrors occur when you use OSS SDK for Node.js, enable debugging
by setting the
DEBUG environment variable.
DEBUG=ali-oss node app.js
In a browser environment, set the
localStorage.debug variable in the console to enable debugging.
localStorage.debug = 'ali-oss'