emeraldpay / emeraldpay/dshackle

ResponseParser Failed - Which upstream?

Open
#187 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
350
Forks
57
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

I upgraded to the latest version and I started seeing this:

```
2022-04-10 15:04:41.691 | WARN | ResponseParser | Failed to parse JSON from upstream: Unrecognized token 'Request': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (byte[])"Request Blocked. Contact Flux Team."; line: 1, column: 9]
2022-04-10 15:04:41.702 | 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[])"
405 Not Allowed

405 Not Allowed



nginx/1.21.6

"; line: 1, column: 2]
```

Obviously the error is coming from one of the configured upstreams but I don't know which one just by looking at the logs.

I can figure it out with some testing but it would be nice if the ResponseParser could tell us which one is throwing the error. Based on the output of the "State of ETH" messages I think it's reporting the upstream at `0` in this case.

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.