facebook / facebook/relay

🚨 [Modern] QueryRenderer fetch operation throws uncaught error

Open
#2,385 9 comments 15 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

It looks like in `1.5.0` (https://github.com/facebook/relay/commit/f76f12a56b2ed7486b8d4a0ce5d8efdf206c2b9a), `relay-runtime` introduced a (pretty major?) bug that manifests as an uncaught exception when handling any Query response that contains GraphQL errors.

```
RelayObservable.js:644 Uncaught Error: No data returned for operation `MyQuery`, got error(s):
HAHA!
```

The root cause looks to be that `normalizePayload` throws errors, and moving that call from the observable `map` call (which handles errors), to a sink (which doesn't handle errors) prevents relay from catching and handling those errors when thrown.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.