emeraldpay / emeraldpay/dshackle

Ignore HTML response

Open
#140 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
350
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Sometimes an upstream may return an error with HTML. For example public upstreams.

Right now Dshakle produces the following log:
```
WARN | ResponseParser | Failed to parse JSON from upstream: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (byte[])"




Site Unavailable
....
```

Also it seems to break WS connection.

Need to catch such errors, and just mark upstream as unavailable until it's restored.

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.