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

[venus-auth] 鉴权失败后返回非空请求体 #5448

Closed
1 of 11 tasks
Tracked by #5527
LinZexiao opened this issue Nov 4, 2022 · 2 comments
Closed
1 of 11 tasks
Tracked by #5527

[venus-auth] 鉴权失败后返回非空请求体 #5448

LinZexiao opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
C-bug Category: This is a bug V-venus-auth

Comments

@LinZexiao
Copy link
Collaborator

链服务模块 / Chain Service Components

  • venus
  • venus-auth
  • venus-gateway
  • venus-messager
  • venus-miner
  • 文档 / docs

订单服务模块 / Deal Service Components

  • venus-market
  • 文档 / docs

算力服务模块 / Storage Power Service Components

  • venus-sector-manager
  • venus-worker
  • 文档 / docs

版本 / Version

auth 1.18

描述 / Describe the Bug

当前版本的auth,鉴权失败之后会返回空的请求体,以及401 错误码
但是 jsonrpc client 接收到 response 之后 会直接 解码空的请求体,然后报解码出错,这会导致错误信息不明确

建议 返回错误状态码的同时,也返回一个非空 的http body

日志 / Logging Information

2022-11-04T03:06:58.238Z        ERROR   chain-ro        cmd/main.go:76  CLI error: (error code -32700) unmarshaling response: EOF: error code -32700

重现步骤 / Repo Steps

No response

@LinZexiao LinZexiao added C-bug Category: This is a bug V-venus-auth labels Nov 4, 2022
@hunjixin
Copy link
Contributor

jsonrpc中非200类型的返回值不应当进行unmarshal操作,不能保证非200类型返回值是个标准jsonrpc返回

@simlecode
Copy link
Collaborator

错误信息增加了 http status

Repository owner moved this from In Progress to Done in Venus Project Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug V-venus-auth
Projects
Archived in project
Development

No branches or pull requests

3 participants