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

curl gets 500 regardless of grpc error code used in HttpsError #129

Open
ekalosak opened this issue Aug 26, 2023 · 3 comments
Open

curl gets 500 regardless of grpc error code used in HttpsError #129

ekalosak opened this issue Aug 26, 2023 · 3 comments
Labels
waiting for customer response Issue is on hold awaiting more information from OP

Comments

@ekalosak
Copy link
Contributor

I'm raising https_fn.HttpsError with various code=https_fn.FunctionsErrorCode.XYZ from within an @https_fn.on_request()-decorated function to test error paths. But if I throw e.g. ostensibly a 400 (FunctionsErrorCode.NOT_FOUND) the caller gets a 500. It doesn't matter what type of error I throw. Is this intentional for on_request? I'd love to have more granular HTTP errors.

Anyway, thanks very much for a lovely Python3 SDK for FB Functions - it's a super convenient service.

@ekalosak
Copy link
Contributor Author

For reference, I'm expecting the behavior described in this doc. Maybe I misread it... I'll give it another close reading but I figured it's good to get this reported.

@ekalosak
Copy link
Contributor Author

Yeah interestingly enough @https_fn.on_call handles the error codes as I'd expect. It's odd to see the ∆ between on_call and on_request error handling.

@exaby73
Copy link
Contributor

exaby73 commented Aug 28, 2023

Hello @ekalosak. Could you provide a short code sample that I may use to reproduce this issue? Also, do include the contents of your requirements.txt and python version as well.

@exaby73 exaby73 added the waiting for customer response Issue is on hold awaiting more information from OP label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for customer response Issue is on hold awaiting more information from OP
Projects
None yet
Development

No branches or pull requests

2 participants