Workflow errors Stay organized with collections Save and categorize content based on your preferences.
Errors for Workflows might be raised, for example, by failed HTTPrequests, functions, connectors, or generated by your own workflow code.
- You canraise custom errorsusing the
raisesyntax. - You cancatch errors usinga
try/exceptblock. - You canretry steps that return aspecific error code and define the maximum number of retry attempts.
Error maps
When a workflow throws an error during execution that isn't caught, theexecution fails, and an error map (a JSON dictionary) describing the error isreturned.
Errors thrown during workflow execution contain tags to help you identify whatcaused the error. For example, the error returned from a connector can have twokeys (tags andmessage) similar to the following:
{'tags': ['SystemError'], 'message': 'an error has occurred'}
There can be more than one tag. To check for a specific tag, you can use anexpression. For example:
${'SystemError' in e.tags}
Access error data returned as a string
Some connectors and HTTP APIs will serialize errors as strings before returningthe errors. You can use standard library functions to restore a payload to theoriginal error. For example, to convert an error string to a map, you can usethejson.decodeandtext.encode functions:
json.decode(text.encode(ERROR_FROM_API))
Error tags
The following table describes the meaning of different error tags.
| Tag | Description |
|---|---|
| AuthError | Raised when generating credentials for an HTTP request fails. |
| ConnectionError | Raised when a connection is successfully established with the endpoint but there is a problem with the connection during data transfer. The connection is terminated before a full response is received and a message might not have been delivered to the endpoint. Retries might not be idempotent. |
| ConnectionFailedError | Raised when a connection is not established with the API endpoint; for example, due to an incorrect domain name, DNS resolution issues, or other network problems. Retries are idempotent. |
| HttpError | Raised when anHTTP request fails with an HTTP error status. When this exception is raised, the response is a map with the following elements:
|
| IndexError | Raised when a sequence subscript is an out of range integer. |
| KeyError | Raised when a map key is not found in the set of existing keys. |
| OperationError | Raised when a long-running operation finishes unsuccessfully. |
| ParallelNestingError | Raised when themaximum depth that parallel steps can be nested is exceeded. |
| RecursionError | Raised when the interpreter detects that the maximum call stack depth is exceeded. |
| ResourceLimitError | Raised when some resource limit is exhausted. When raised internally, this type of error cannot be caught and causes immediate execution failure. |
| ResponseTypeError | Raised when a long-running operation returns a response of the wrong type. |
| SystemError | Raised when the interpreter finds an internal error. |
| TimeoutError | Raised when a system function times out at the system level. |
| TypeError | Raised when an operation or function is applied to an object of incompatible type. The associated value is a string giving details about the type mismatch. |
| UnhandledBranchError | Raised when one or more branches or iterations encounters an unhandled runtime error up to amaximum number. |
| ValueError | Raised when an operation or function receives an argument that has the correct type but an incorrect value, and the situation is not described by a more precise exception, such as anIndexError. |
| ZeroDivisionError | Raised when the second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation. |
What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.