has_error
Synopsis
@has_symbol([String]) -> Boolean
@has_symbol([InnerFunction]) -> Boolean
Description
Checks whether a backend reported an error for an object.
info
Available in Contextal Platform 1.0 and later.
Parameters
An optional argument allows for matching the exact error string (with a 'String' value) reported by a backend, or inside that string using inner functions regex
/iregex
/starts_with
.
Return value
Boolean: true
if an error was reported, false
otherwise.
Examples
@has_error()
- This will match objects, for which errors were reported.
note
The error messages are backend specific and there is no common standard here. For example, the Email
backend can report a following error message:
"error": "Invalid data (Truncated or otherwise invalid mail)"
to match objects with this error, you can use a query like:
object_type == "Email" && @has_error(regex("Truncated"))