Lumerin-protocol / Morpheus-Lumerin-Node

MIT License
2 stars 5 forks source link

GET /blockchain/sessions returns an empty error #190

Closed tshak closed 2 weeks ago

tshak commented 2 weeks ago

Repro

curl http://localhost:8082/blockchain/sessions

Expected

A JSON response with an error indicating that user or provider is required.

A log message in server logs with a similar error

Actual

An empty JSON response: {"error":{}}

A log message containing Error

Note: it looks like err is always nil here https://github.com/Lumerin-protocol/Morpheus-Lumerin-Node/blob/dev/proxy-router/internal/blockchainapi/controller.go#L669

abs2023 commented 2 weeks ago

@alex-sandrk can you please take a look? Reproduceable directly via swagger (no prompting of what is missing from the request). I also notice that on some of the API functions, there are required inputs, but not one on this (is it because you could pick one or the other?). Thoughts on breaking this out (if we can't ask API for one or the other required field) into two ... one /blockchain/sessions/{user} and another /blockchain/sessions/{provider} ?

image

alex-sandrk commented 2 weeks ago

Thank you for your MR, it's merged. Also, I agree with Alan about splitting this command into two separate. Here is PR: https://github.com/Lumerin-protocol/Morpheus-Lumerin-Node/pull/195