haskell-servant / haskell-servant/servant-js

The generated native else branch shouldn't try to parse json

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
23
Forks
22
PR merge metrics
No merged PRs in 30d

Description

In my case I had a simple connection issue, but because it attempted to parse that result I coudln't see the error.

```javascript
else {
try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
if (res) onError(res);
}
```

should become:

```javascript
else {
onError(xhr); // let t he user figure it out
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.