Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 9aa916d

Browse files
author
Richard Hua
authored
Document error handling in the management SDK
1 parent 1a598d5 commit 9aa916d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sdk/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,15 @@ The `code-push` module exports a single class (typically referred to as `CodePus
8888
- __rollback(appName: string, deploymentName: string, targetRelease?: string): Promise<void>__ - Rolls back the latest release within the specified deployment. Optionally allows you to target a specific release in the deployment's history, as opposed to rolling to the previous release.
8989

9090
- __transferApp(appName: string, email: string): Promise<void>__ - Transfers the ownership of the specified app to the specified account.
91+
92+
### Error Handling
93+
94+
When an error occurs in any of the methods, the promise will be rejected with a CodePushError object with the following properties:
95+
96+
- __message__: A user-friendly message that describes the error.
97+
- __statusCode__: An HTTP response code that identifies the category of error:
98+
- __CodePush.ERROR_GATEWAY_TIMEOUT__: A network error prevented you from connecting to the CodePush server.
99+
- __CodePush.ERROR_INTERNAL_SERVER__: An error occurred internally on the CodePush server.
100+
- __CodePush.ERROR_NOT_FOUND__: The resource you are attempting to retrieve does not exist.
101+
- __CodePush.ERROR_CONFLICT__: The resource you are attempting to create already exists.
102+
- __CodePush.ERROR_UNAUTHORIZED__: The access key you configured is invalid or expired.

0 commit comments

Comments
 (0)