Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] POST /configuration doesn't work #3445

Closed
0x009922 opened this issue May 3, 2023 · 1 comment
Closed

[BUG] POST /configuration doesn't work #3445

0x009922 opened this issue May 3, 2023 · 1 comment
Assignees
Labels
Bug Something isn't working Dev defect The defect was found at the development stage. Did not have an impact on users. iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix

Comments

@0x009922
Copy link
Contributor

0x009922 commented May 3, 2023

OS and Environment

macOS 13.2.1 (22D68)

GIT commit hash

b185545

Minimum working example / Steps to reproduce

curl -X POST -H 'content-type: application/json' http://127.0.0.1:8080/configuration -d '{"LogLevel" : "Debug"}' -i

Actual result

500 error, logs:

Some(Rejection([BodyConsumedMultipleTimes, BodyDeserializeError { cause: Error(\"unknown variant `LogLevel`, expected `Docs` or `Value`\", line: 1, column: 11) }, MethodNotAllowed]))

(see JSON logs below)

Expected result

Expected to set the log level without errors.

Logs in JSON format

Log contents
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - START]","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.730539Z","target":"warp::filters::trace","line":45,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","version":"HTTP/1.1","method":"POST","path":"/configuration"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - EVENT] processing request","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.730608Z","target":"warp::filters::trace","line":301,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - START]","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.73062Z","target":"warp::filters::trace","line":45,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - EVENT] processing request","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.730633Z","target":"warp::filters::trace","line":301,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - EVENT] unable to serve request (client error)","level":40,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.73101Z","target":"warp::filters::trace","line":260,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","status":404,"error":"Some(Rejection(NotFound))","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - END]","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.731021Z","target":"warp::filters::trace","line":45,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1","elapsed_milliseconds":0}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - EVENT] request body already taken in previous filter","level":50,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.731235Z","target":"warp::filters::body","line":31,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/body.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - EVENT] unable to process request (internal error)","level":50,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.731257Z","target":"warp::filters::trace","line":253,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","status":500,"error":"Some(Rejection([BodyConsumedMultipleTimes, BodyDeserializeError { cause: Error(\"unknown variant `LogLevel`, expected `Docs` or `Value`\", line: 1, column: 11) }, MethodNotAllowed]))","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1"}
{"v":0,"name":"bunyan_layer","msg":"[REQUEST - END]","level":30,"hostname":"quacumques-MacBook-Pro.local","pid":47161,"time":"2023-05-03T06:41:12.731406Z","target":"warp::filters::trace","line":45,"file":"/Users/quacumque/.cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.3.3/src/filters/trace.rs","remote.addr":"127.0.0.1:52385","method":"POST","path":"/configuration","version":"HTTP/1.1","elapsed_milliseconds":0}

Who can help to reproduce?

No response

Notes

I wonder if it is something that was broken by #3340

@0x009922 0x009922 added Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST labels May 3, 2023
0x009922 added a commit to 0x009922/iroha-javascript that referenced this issue May 3, 2023
Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@AlexStroke AlexStroke added QA-pending This bug is reported but is missing an MWE QA-confirmed This bug is reproduced and needs a fix Dev defect The defect was found at the development stage. Did not have an impact on users. and removed QA-pending This bug is reported but is missing an MWE labels May 23, 2023
@AlexStroke
Copy link
Contributor

Fully reproducible.

@AlexStroke AlexStroke assigned mversic and unassigned AlexStroke May 24, 2023
@appetrosyan appetrosyan assigned DCNick3 and ilchu and unassigned mversic and DCNick3 Jul 20, 2023
ilchu added a commit to ilchu/iroha that referenced this issue Jul 21, 2023
Signed-off-by: Ilia Churin <churin.ilya@gmail.com>
appetrosyan pushed a commit that referenced this issue Jul 21, 2023
Signed-off-by: Ilia Churin <churin.ilya@gmail.com>
@AlexStroke AlexStroke self-assigned this Jul 25, 2023
mversic pushed a commit that referenced this issue Oct 17, 2023
Signed-off-by: Ilia Churin <churin.ilya@gmail.com>
0x009922 added a commit to 0x009922/iroha-javascript that referenced this issue Nov 2, 2023
The issue:

  hyperledger-iroha/iroha#3445

The fix:

  hyperledger-iroha/iroha#3735

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@alexstroke1 alexstroke1 assigned alexstroke1 and unassigned AlexStroke Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Dev defect The defect was found at the development stage. Did not have an impact on users. iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix
Projects
None yet
Development

No branches or pull requests

6 participants