Options
All
  • Public
  • Public/Protected
  • All
Menu

The OkHiException class extends the Error class to provide additional information regarding the type of errors thrown while running any OkHiLibraries. It contains static string properties that can be used to evaluate the kind of errors being thrown and handle them appropriately.

Hierarchy

Index

Constructors

constructor

Properties

code

code: string

Specific error code string detailing the kind of error being thrown.

message

message: string

name

name: string

Optional stack

stack: undefined | string

Static BAD_REQUEST_CODE

BAD_REQUEST_CODE: string = "bad_request"

Error is thrown whenever bad configuration is provided to an OkHi service.

Static BAD_REQUEST_MESSAGE

BAD_REQUEST_MESSAGE: string = "Invalid parameters provided"

Error is thrown whenever bad configuration is provided to an OkHi service.

Static Error

Error: ErrorConstructor

Static INVALID_PHONE_CODE

INVALID_PHONE_CODE: string = "invalid_phone"

Error is thrown whenever an invalid phone number is provided to a service that requires a user's phone number.

Static INVALID_PHONE_MESSAGE

INVALID_PHONE_MESSAGE: string = "Invalid phone number provided. Please make sure its in MSISDN standard format"

Error is thrown whenever an invalid phone number is provided to a service that requires a user's phone number.

Static NETWORK_ERROR_CODE

NETWORK_ERROR_CODE: string = "network_error"

Error is thrown when the device can't connect to OkHi's servers.

Static NETWORK_ERROR_MESSAGE

NETWORK_ERROR_MESSAGE: string = "Unable to establish a connection with OkHi servers"

Error is thrown when the device can't connect to OkHi's servers.

Static PERMISSION_DENIED_CODE

PERMISSION_DENIED_CODE: string = "permission_denied"

Error is thrown whenever a particular permission is required for a service to run and isn't granted by the user.

Static SERVICE_UNAVAILABLE_CODE

SERVICE_UNAVAILABLE_CODE: string = "service_unavailable"

Error is thrown whenever a particular device service is required for a library to run and isn't granted by the user.

Static UNAUTHORIZED_CODE

UNAUTHORIZED_CODE: string = "unauthorized"

Error is thrown whenever there's an issue with the credentials provided.

Static UNAUTHORIZED_MESSAGE

UNAUTHORIZED_MESSAGE: string = "Invalid credentials provided"

Error is thrown whenever there's an issue with the credentials provided.

Static UNKNOWN_ERROR_CODE

UNKNOWN_ERROR_CODE: string = "unknown_error"

Error is thrown whenever there's an unknown error that occured during the usage of one of OkHi's services.

Static UNKNOWN_ERROR_MESSAGE

UNKNOWN_ERROR_MESSAGE: string = "Unable to process the request. Something went wrong"

Error is thrown whenever there's an unknown error that occured during the usage of one of OkHi's services.

Static UNSUPPORTED_PLATFORM_CODE

UNSUPPORTED_PLATFORM_CODE: string = "unsupported_platform"

Error is thrown whenever an OkHi service is run on an unsupported platform.

Static UNSUPPORTED_PLATFORM_MESSAGE

UNSUPPORTED_PLATFORM_MESSAGE: string = "OkHi methods currently support Android devices only"

Error is thrown whenever an OkHi service is run on an unsupported platform.

Legend

  • Constructor
  • Property
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc