Now4realError

Now4realError

This class is used to report error conditions encountered during API calls.

Constructor

new Now4realError()

You cannot use this constructor directly. Interact with instances of this class through API methods promise rejections.

Members

(readonly) code :ErrorCode

The identifier of the error.

(readonly) message :string

The description of the error.

Type Definitions

AbortedError :Now4realError

Occurs when the authentication flow has been interrupted before its conclusion.

Properties:
Name Type Description
code string

"ABORTED"

description string

The description of the error.

AccessDeniedError :Now4realError

Occurs when the access to the Now4real cloud has been prevented due to a wrong client configuration.

Properties:
Name Type Description
code string

"ACCESS_DENIED"

description string

The description of the error.

AlreadyPresentError :Now4realError

It occurs when attempting to create a new poll within a specific Page context, but there is already an active one present within it.

Properties:
Name Type Description
code string

"ALREADY_PRESENT"

description string

The description of the error.

AlreadyReportedError :Now4realError

It happens when the currently authenticated user tries to report a message that they had previously reported.

Properties:
Name Type Description
code string

"ALREADY_REPORTED"

description string

The description of the error.

AlreadyStartedError :Now4realError

It occurs when a new authentication flow is requested, but there is already one in progress.

Properties:
Name Type Description
code string

"ALREADY_STARTED"

description string

The description of the error.

BlockedError :Now4realError

When calling the login method, it occurs when the browser blocks the authentication popup, thus preventing the process from proceeding.

When calling the post method, instead, it happens when the message cannot be posted as it is considered offensive.

Properties:
Name Type Description
code string

"BLOCKED"

description string

The description of the error.

CannotModerateError :Now4realError

It occurs when the message cannot be posted due to a malfunction in the automatic moderation system. A new attempt to call the method should be done later.

Properties:
Name Type Description
code string

"CANNOT_MODERATE"

description string

The description of the error.

ChatDisabledError :Now4realError

Occurs when either the "post" or "createPoll" methods are invoked on a disabled pagechat.

Properties:
Name Type Description
code string

"CHAT_DISABLED"

description string

The description of the error.

ClosedError :Now4realError

It occurs when attempting to submit a vote in a currently closed poll.

Properties:
Name Type Description
code string

"CLOSED"

description string

The description of the error.

DisconnectedError :Now4realError

Occurs when the client is not connected to the Now4real cloud (usually because it is offline) but the called method requires a connection.

Properties:
Name Type Description
code string

"DISCONNECTED"

description string

The description of the error.

InvalidArgumentsError :Now4realError

Occurs when the arguments passed to a method are either invalid or malformed.

Properties:
Name Type Description
code string

"INVALID_ARGUMENTS"

description string

The description of the error.

InvalidCallError :Now4realError

Occurs when a method has been called but could not be called.

Properties:
Name Type Description
code string

"INVALID_CALL"

description string

The description of the error.

NotAuthenticatedError :Now4realError

Occurs when there is no currently signed in user but the called method requires a successfully authenticated user.

Properties:
Name Type Description
code string

"NOT_AUTHENTICATED"

description string

The description of the error.

NotAuthorizedError :Now4realError

Occurs when the current user is not authorized to call a method.

Properties:
Name Type Description
code string

"NOT_AUTHORIZED"

description string

The description of the error.

NotFoundError :Now4realError

It happens when the called method requires an active poll, but is not present in the current Page context.

Properties:
Name Type Description
code string

"NOT_FOUND"

description string

The description of the error.

ServiceUnavailableError :Now4realError

Occurs when the Now4real cloud failed to respond. A new attempt to call the method should be done later.

Properties:
Name Type Description
code string

"SERVICE_UNAVAILABLE"

description string

The description of the error.

TechnicalProblemError :Now4realError

Occurs when there was an unexpected error during the execution of an operation.

Properties:
Name Type Description
code string

"TECHNICAL_PROBLEM"

description string

The description of the error.

TooFrequentError :Now4realError

Occurs when the post method has been called before the messageResendPeriod has passed.

Properties:
Name Type Description
code string

"TOO_FREQUENT"

description string

The description of the error.

UserMutedError :Now4realError

Occurs when a method has been called on behalf of a muted Now4real user in the current pagechat.

Properties:
Name Type Description
code string

"USER_MUTED"

description string

The description of the error.