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

Kitex is always returning ErrRemoteOrNetwork after newIOErrorHandleMW #1210

Open
felix021 opened this issue Dec 28, 2023 · 3 comments
Open
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@felix021
Copy link
Contributor

Describe the bug

For example, when the client fails to encode a request, it's actually a client-side error, but Kitex is still returning ErrRemoteOrNetwork, which is a little misguiding.

To Reproduce

Send a request with a required field set to nil.

Expected behavior

Return an error other than ErrRemoteOrNetwork.

Kitex version:

Including the latest version (v0.8.0).

@felix021 felix021 added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 22, 2024
@Ambition6666
Copy link

Ambition6666 commented Mar 1, 2024

我可以试试

@felix021
Copy link
Contributor Author

Cool, 你可以先描述下具体思路,我们讨论一下。

@Ambition6666
Copy link

Cool, 你可以先描述下具体思路,我们讨论一下。
我通过debug发现错误是在服务端解码的时候发生的, 但实际上该错误在客户端时设置值时就有了,所以我认为可以在客户端编码的时候就检查有没有设置必须字段为空的情况, 然后对其进行错误处理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Development

No branches or pull requests

2 participants