haskell-servant / servant-js

Automatically derive javascript functions to query servant webservices.
Other
23 stars 22 forks source link

Generated Vanilla js attempts to parse error bodies as json #43

Open googleson78 opened 4 years ago

googleson78 commented 4 years ago

When servant-server returns an error with a body (e.g. on failure to parse, or missing required arguments), it's not json-encoded (it's plain-text) "by default" (e.g. when using ReqBody).

However the Vanilla generated functions always attempt to parse the error response body as json, which fails (because of missing double quotes).