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

Return handlebale error on denied outbound HTTP requests #139

Open
kate-goldenring opened this issue Jun 17, 2024 · 1 comment
Open

Return handlebale error on denied outbound HTTP requests #139

kate-goldenring opened this issue Jun 17, 2024 · 1 comment

Comments

@kate-goldenring
Copy link
Collaborator

@rylev found a bug in the shim using the new conformance tests suite. For the failing conformance test, we make a request to the app containing the url for it to make a downstream request to. If the app doesn't have permission, that call should fail, and the app will return a 500 with the body of the response set to the display of the ErrorCode encountered.

 // Get the incoming response.
        let response = match outgoing_handler::handle(outgoing_request, None) {
            Ok(r) => r,
            Err(e) => {
                return_response(outparam, 500, e.to_string().as_bytes());
                return;
            }
        };

The fix was added to Spin CLI in https://github.com/fermyon/spin/pull/2512/files#diff-d089e464d241060ca01fb6433e027427bf7c3248571995bc8d8b9712776f6166R726 which will be in release v2.6.0

Bumping to Spin v2.6 should fix the test

@adamreese
Copy link
Member

Can this be closed with #144?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants