Run resolvers in the presence of upstream failures.
Chalk returns an error channel in addition the requested feature values.
There are several types of errors one could expect:
Request errors are raised before execution of your resolver code. They may occur due to invalid feature names in the input or a request that cannot be satisfied by the resolvers you have defined.
Field errors are raised while running a feature resolver
for a particular field.
For this type of error, you’ll find a feature
and resolver
attribute in the error type.
When a feature resolver crashes, you will receive null
value
in the response.
To differentiate from a resolver returning a null
value and
a failure in the resolver, you need to check the error schema.
Network errors are thrown outside your resolvers. For example, your request was unauthenticated, connection failed, or an error occurred within Chalk.
The online query interface for resolvers returns the following schema:
dataFeatureResult[]
errorsChalkError[]?
codeErrorCode
categoryErrorCode.kind
messagestring
exceptionobject?
kindstring
messagestring
stacktracestring
featurestring?
user.identity.has_voip_phone
.resolverstring?
my.project.get_fraud_score
.PARSE_FAILEDREQUEST
RESOLVER_NOT_FOUNDREQUEST
INVALID_QUERYREQUEST
VALIDATION_FAILEDFIELD
RESOLVER_FAILEDFIELD
RESOLVER_TIMED_OUTFIELD
UPSTREAM_FAILEDFIELD
UNAUTHENTICATEDNETWORK
UNAUTHORIZEDNETWORK
INTERNAL_SERVER_ERRORNETWORK