UNPKG

@signiant/media-shuttle-sdk-base

Version:

The base parent sdk behind other media shuttle sdks (e.g. media-shuttle-sdk)

131 lines 4.75 kB
/** * This enum represents the various caller facing errors the application may throw. Implementations may * optionally catch {@link CodedError} objects and define control behaviour on the basis of a specific error. */ declare enum ErrorCode { /** * The User canceled folder selection on download. */ FOLDER_SELECTION_CANCELED = "folder.selection.canceled", /** * There was an unknown error during folder selection. */ FOLDER_SELECTION_ERROR = "folder.selection.error", /** * There was a timeout when attempting to connect to the Signiant app. * * Root causes could include: * * The app has not been installed. * * The app was installed but the user did not authorize the launch in the required time. * * Network connectivity issues. */ APP_CONNECTION_TIMEOUT = "app.connection.timeout", /** * Error thrown when the app may not be installed. This happens the first time the SDK is used but can * be overwritten with the force flag when generating a transfer. */ APP_MAY_NOT_BE_INSTALLED = "app.may.not.be.installed", /** * The input does not conform to the expected logger format. * * Null loggers are not allowed, If you wish to disable all logging consider turning the log level of the * default logger to OFF. */ LOGGER_INVALID = "logger.invalid", /** * An event dispatched by the Signiant app was unknown. * * This might represent a mismatch between the SDK version and the Signiant app version. */ UNKNOWN_EVENT_TYPE = "error.type.unknown", /** * Unknown problem while launching the Signiant App. */ ERROR_LAUNCHING_APP = "error.launching.app", /** * The Signiant app connection was not initialized for an operation that requires the app. * * App initialization should be done automatically when a download is generated. */ APP_CONNECTION_UNINITIALIZED = "app.connection.uninitialized", /** * A folder was not selected by a user. * * A user should be prompted for a destination folder automatically when a transfer is created. */ FOLDER_NOT_SELECTED = "folder.not.selected", /** * State transition is not valid. * * Examples of this error include but are not limited to: * * Attempting to start a transfer that has already been started. * * Attempting to retry a transfer before a transfer was started. */ STATE_TRANSITION_INVALID = "invalid.state.transition", /** * Operation not supported. */ UNSUPPORTED_OPERATION = "unsupported.operation", /** * Currently only download operations are supported. */ UNSUPPORTED_TRANSFER_DIRECTION = "transfer.unsupported.direction", /** * Websocket connection timed out after fixed interval. */ WEBSOCKET_CONNECTION_TIMEOUT = "websocket.connection.timeout", /** * An unknown error occurred while initializing the websocket. */ WEBSOCKET_INITIALIZATION_ERROR = "websocket.initialization.error", /** * Error while trying to encrypt message to publish. */ ENCRYPTION_ERROR = "encryption.error", /** * Error while trying to decrypt message received. */ DECRYPTION_ERROR = "decryption.error", /** * There was no recognized provided in the relevant messaging config. */ NO_PROVIDER_ERROR = "no.provider.error", /** * The user is not a member of the portal. */ PORTAL_MEMBER_NOT_FOUND = "portal.member.not.found", /** * The user does not have permission to download one or more of the specified files. */ FILE_PERMISSIONS_DENIED = "file.permissions.denied", /** * The user does not have any member permissions on the portal. */ USER_PERMISSIONS_NOT_SET = "user.permissions.not.set", /** * The user cancels the file selection cancelled */ FILE_SELECTION_CANCELLED = "files.selection.canceled", /** * There was an error in the file selection */ FILE_SELECTION_ERROR = "files.selection.error", /** * Error code when attempting to start a transfer without the Transfer Config */ TRANSFER_CONFIG_NOT_FOUND = "transfer.config.not.found", /** * Error code when attempting to start a transfer without the destination */ TRANSFER_DESTINATION_MISSING_ERROR = "transfer.destination.not.found", /** * Error code when trying to start an upload without selected files */ UPLOAD_NO_FILES_SELECTED = "upload.no.files.selected", /** * Used when request timeouts */ REQUEST_TIMEOUT = "request.timeout" } export default ErrorCode; //# sourceMappingURL=ErrorCode.d.ts.map