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

gateway can not handle incorrect model name #527

Closed
Jeffwan opened this issue Dec 13, 2024 · 3 comments
Closed

gateway can not handle incorrect model name #527

Jeffwan opened this issue Dec 13, 2024 · 3 comments
Assignees
Labels
area/gateway good first issue Good for newcomers help wanted Extra attention is needed kind/bug Something isn't working
Milestone

Comments

@Jeffwan
Copy link
Collaborator

Jeffwan commented Dec 13, 2024

🐛 Describe the bug

If I use a wrong name, it returns some unmarshal error which should be already avoided.

image

image

Steps to Reproduce

No response

Expected behavior

No response

Environment

No response

@Jeffwan Jeffwan added kind/bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed area/gateway labels Dec 13, 2024
@Jeffwan Jeffwan added this to the v0.2.0 milestone Dec 13, 2024
@Jeffwan Jeffwan self-assigned this Dec 17, 2024
@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Dec 23, 2024

error is from

E1223 19:59:10.389975       1 gateway.go:375] "error to unmarshal response" err="invalid character 'u' looking for beginning of value" requestID="f5f0d4fe-ea19-4137-8367-7fa037d897d3" responseBody="upstream connect error or disconnect/reset before headers. reset reason: protocol error"

If the model is missing, the responseBody is not the right request message upstream connect error or disconnect/reset before headers. reset reason: protocol error

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Dec 23, 2024

it actually failed at the HandleResponseBody, for such issues, we should block it and return error directly. No need to forward to backend.
image

@Jeffwan
Copy link
Collaborator Author

Jeffwan commented Dec 23, 2024

We already use Response: &extProcPb.ProcessingResponse_ImmediateResponse to bypass rest process, adding the cache model existing check works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway good first issue Good for newcomers help wanted Extra attention is needed kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant