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

fix: fix function URL matching #6052

Merged
merged 1 commit into from
Oct 10, 2023
Merged

fix: fix function URL matching #6052

merged 1 commit into from
Oct 10, 2023

Conversation

eduardoboucas
Copy link
Member

Summary

In recent changes to how we match URL paths for functions, we started relying solely on FunctionsRegistry.getFunctionForURLPath, even for matching paths for the default functions URL (i.e. /.netlify/functions).

The problem is that this method is returning undefined if there is no matching function, but we also need to know when a URL is definitely for a function (i.e. starts with /.netlify/functions) regardless of whether an actual function for that name exists.

This is important so that we handle 404s in the functions server, letting us return the right status code and message. This PR fixes that.

@eduardoboucas eduardoboucas requested a review from a team as a code owner October 10, 2023 16:34
@github-actions
Copy link

📊 Benchmark results

Comparing with 8ae2d5b

  • Dependency count: 1,388 (no change)
  • Package size: 398 MB (no change)

@eduardoboucas eduardoboucas enabled auto-merge (squash) October 10, 2023 16:38
@eduardoboucas eduardoboucas merged commit 31cf36a into main Oct 10, 2023
61 checks passed
@eduardoboucas eduardoboucas deleted the fix/function-url-match branch October 10, 2023 16:43
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

Successfully merging this pull request may close these issues.

2 participants