For the complete documentation index, see llms.txt. This page is also available as Markdown.

Catch exception

The Catch Exception Action Node is used to execute an action when an error occurs.

When an error occurs in an action node, normal execution of the action will stop, and Appfarm will look for a Catch Exception Action Node. It will first look downward on the same level, then go up one level to look for it there (top-down), and so on. When it finds a catch block that meets the criteria of the error, the catch will execute whatever is defined inside it and then resume execution starting with the node directly after the catch (unless you use end execution or some other flow-changing action).

Settings

Catch All

If selected, all types of errors will trigger the execution of the action nodes inside the action.

Execution Types

If Catch All is not selected, you need to define the execution type(s) that shall be caught. Four different options are available, and have a set of different properties.

Delete Constraint Exception

Used when there's a Delete Rule on a relation in the database, and the user tries to delete a parent. As long as objects in an object class have reference to a remote object class, deletions of referenced objects will not be allowed, i.e., if objects in the Project object class reference a Person object, it will not be possible to delete that Person object.

Web Request Error

Used when a web request returns an error, i.e., 400 or 500 error codes. If you don't want the action node to catch all exceptions, you might define specific HTTP Error Codes to be caught by the action node.

Custom Exception

Used when a Throw Exception Action Node returns an error. If you don't want the action node to catch all custom exceptions, you can define specific error codes that should be caught by the action node.

Defined errors

Used when Appfarm returns an error. Only the error codes you define will be caught by the action node. Relevant Appfarm error codes are grouped below.

Login ticket errors

Code
Name
HTTP
Description

10400

InvalidTokenError

400

Invalid token provided

10403

UserValidationError

403

Unauthorized

10410

LoginTicketNotFoundError

Unable to find ticket from token

10440

ExpiredLoginTicketError

Token expired

10500

InvalidLoginTicketDataError

Invalid data in Login Ticket

Auth errors

Code
Name
HTTP
Description

11002

GoogleUserNotFoundError

401

Unable to find user connected to Google Account

11005

UserAccountNotFound

404

Unable to find Appfarm User Account

11010

MissingOtpReferenceError

403

Cannot login this device with one time password

11011

ExpiredOtpReferenceError

403

One time password has expired

11012

TooManyOtpTriesError

403

Too many retries

11013

InvalidPinError

401

Invalid PIN

11014

UserAccessDisabled

403

User is disabled

11040

AnonymousAppAccessError

403

Anonymous application access is not enabled

11041

LoginMetodDisabledError

403

Tried to use a disabled login method

11401

AuthenticationError

401

Authentication required

11403

AuthorizationError

403

User does not have sufficient permissions

11404

EnvironmentAuthorizationError

403

Operation not allowed from current environment

11500

InternalError

500

Internal error

User errors

Code
Name
HTTP
Description

13005

MultipleUsersFoundError

500

Found more than one matching user

Generic errors

Code
Name
HTTP
Description

14002

AmpServerError

500

Unknown AMP server error

14003

NotImplementedError

500

Feature not implemented

14004

NotSupportedError

500

Feature not supported

14005

InputSanitationError

400

User input failed sanitation check

14006

ApiRequestError

500

Call to API failed

14007

UserAccountAlreadyExistException

409

User already in current solution

14008

ResourceGoneError

410

Resource is no longer available

14009

QuotaExceededException

422

Quota exceeded

14010

InvalidOperationError

400

Invalid operation

14011

NotEnabledError

403

Feature not enabled

14012

DeploymentConflictError

409

Cannot deploy due to conflicts

14400

InvalidEmailError

400

Invalid email address

14401

ClientOutOfSyncException

400

Client out of sync with server

14402

NetworkError

0

Network error occurred

14403

HttpError

0

Generic HTTP error

14404

ResourceNotFoundError

404

Resource not found

14408

TimeoutError

408

Request timeout

14900

InputValidationError

400

Invalid input data

14901

DataTypeError

400

Invalid datatype error

14902

RequiredDataError

400

Data cannot be nil

AMP protocol errors

Code
Name
HTTP
Description

15002

AmpMessageError

400

Unknown AMP message error

15003

AmpProtocolError

406

Protocol error

15004

ServerRestartException

400

Server is restarting

Model / function errors

Code
Name
HTTP
Description

16001

UnexpectedDataTypeError

500

Unexpected datatype returned from function

16002

FunctionEvalError

500

Custom function value failed to evaluate

16003

FunctionEvalTimeoutError

500

Eval timeout — function took too long

16500

ModelParsingError

500

Failed to parse model

Action node exceptions

Code
Name
HTTP
Description

17001

AppfarmCustomException

500

Thrown by Throw Exception nodes

17003

WebRequestException

500

Web request error

17004

GetUserMediaNotAllowedError

500

Camera/media access denied

17005

WebRequestTimeoutException

0

Web request timed out

17006

WebRequestAbortedException

0

Web request aborted

17007

SendEmailException

500

Send email failed

17008

SendEmailValidationException

400

Send email validation failed

17009

SendSMSValidationException

400

Send SMS validation failed

17011

WebPushValidationException

400

Web push validation failed

17013

CreateShortlinkException

500

Shortlink creation failed

17014

UserAccountException

500

User account error

17015

UserAccountValidationException

400

User account validation failed

17016

UploadFileFromURLException

500

Upload from URL failed

17017

UploadFileFromURLValidationException

400

Upload from URL validation failed

17018

FileAbortException

400

File operation aborted

17019

ActionNodeConfigurationError

400

Action node misconfigured by developer

17020

AgentRuntimeUnavailableError

500

Agent runtime not available in this context

17021

AgentLimitReachedError

500

Agent loop hit safety limit

17022

AgentToolInvocationError

400

LLM-supplied tool input violated contract

17101

ActionNodeFailedError

0

Action node failed (runner-level)

17102

ActionNodeAbortedError

0

Action node aborted

17200

DebuggerResetError

400

Debugger reset

17201

DebuggerAbortedError

400

Execution aborted by debugger

Validation errors

Code
Name
HTTP
Description

1800

ValidationError

400

Generic validation error

API service errors

Code
Name
HTTP
Description

31403

ActionNodeFailedError

400

Action Node Failed

31500

JobConcurrencyError

500

Cannot run multiple instances of job

31501

ActionNotFoundError

500

Unable to find action

Client errors

Code
Name
HTTP
Description

30001

OnAppLoadFailedError

500

onAppLoad action failed

30002

RequestTimeoutError

408

Server did not respond in time

30003

ConnectionNotReadyError

503

Connection not ready

30004

PingTimeoutError

408

No ping response in time

30005

ApplyChangeError

500

Failed to apply operation bundle on server

30006

AbortError

0

Request aborted

Client service errors

Code
Name
HTTP
Description

32001

AppNotActiveError

400

App is not set active

32002

ClientOutOfSyncError

400

Client Out of Sync

32003

UnknownOperationError

500

Unknown Operation

Data service errors

Code
Name
HTTP
Description

34002

UniquenessConstraintError

500

Uniqueness constraint violated

34003

MissingRequiredFieldsError

500

Required fields missing

34004

InsufficientCreatePermissionError

403

Insufficient create permission

34005

InsufficientAggregatePermissionError

403

Insufficient aggregate permission

34006

InsufficientUpdatePermissionError

403

Insufficient update permission

34007

InsufficientDeletePermissionError

403

Insufficient delete permission

34008

UpdateReadOnlyError

403

Attempted to update read-only field

34009

UpdateObjectError

500

Update object failed

34010

PersistError

500

Persist failed

34011

DeleteConstraintException

500

Unable to delete object (child references exist)

34012

PropertyValidationError

400

Property validation failed

34013

ConflictError

409

Conflict

34014

InsufficientReadPermissionError

403

Insufficient read permission

34015

BadRequestError

400

Bad request

34016

DocumentLimitExceededError

400

Document limit exceeded

Messaging errors

Code
Name
HTTP
Description

35001

SmsDisabledException

SMS is disabled

35002

DailyQuotaExceededException

Daily quota exceeded

35003

MonthlyQuotaExceededException

Monthly quota exceeded

Result mapping

Result mapping might be used to map error data to Data Sources. The following data is available:

Key
Data

httpStatusCode

Error code

code

Internal Appfarm error code

name

Error name

message

Error message

body

Web Request response data

The data is returned as a JSON object, and body data can be mapped by setting RootPath to body.theKeyYouWant.

Last updated

Was this helpful?