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[]?codeErrorCodecategoryErrorCode.kindmessagestringexceptionobject?kindstringmessagestringstacktracestringfeaturestring?user.identity.has_voip_phone.resolverstring?my.project.get_fraud_score.PARSE_FAILEDREQUESTRESOLVER_NOT_FOUNDREQUESTINVALID_QUERYREQUESTVALIDATION_FAILEDFIELDRESOLVER_FAILEDFIELDRESOLVER_TIMED_OUTFIELDUPSTREAM_FAILEDFIELDUNAUTHENTICATEDNETWORKUNAUTHORIZEDNETWORKINTERNAL_SERVER_ERRORNETWORK