fix: URL-encode function name in fetchFunctionLogs to fix 404 for zero-config functions#429
Closed
fix: URL-encode function name in fetchFunctionLogs to fix 404 for zero-config functions#429
Conversation
Functions with slashes in their names (zero-config functions like stam/foo from functions/stam/foo/entry.ts) were causing 404 errors because the slash was interpreted as a path separator. Co-authored-by: Kfir Stri <kfirstri@users.noreply.github.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.47-pr.429.4d0c680Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.47-pr.429.4d0c680"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.47-pr.429.4d0c680"
}
}
Preview published to npm registry — try new features instantly! |
Collaborator
Author
|
https://github.com/base44-dev/apper/pull/5772 we need to merge this first |
kfirstri
added a commit
that referenced
this pull request
Mar 19, 2026
…o-config functions (#429) * fix: URL-encode function name in fetchFunctionLogs API call Functions with slashes in their names (zero-config functions like stam/foo from functions/stam/foo/entry.ts) were causing 404 errors because the slash was interpreted as a path separator. Co-authored-by: Kfir Stri <kfirstri@users.noreply.github.com> * lint * fix test server --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Kfir Stri <kfirstri@users.noreply.github.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Description
This PR fixes a bug where fetching logs for zero-config functions with slashes in their names (e.g.,
stam/foofromfunctions/stam/foo/entry.ts) resulted in a 404 error. The function name was being interpolated directly into the URL path, causing the slash to be treated as a path separator by the server. The fix appliesencodeURIComponent()tofunctionNameinfetchFunctionLogs, consistent with howdeploySingleFunctionanddeleteSingleFunctionalready handle this. The test server mocks are updated accordingly.Related Issue
Fixes #421
Type of Change
Changes Made
functionNamewithencodeURIComponent()when building the URL infetchFunctionLogs(packages/cli/src/core/resources/function/api.ts)mockFunctionLogsandmockFunctionLogsErrorinTestAPIServer.tsto useencodeURIComponent(functionName)so mock routes match the encoded URLsfetchFunctionLogsin line withdeploySingleFunctionanddeleteSingleFunction, which already apply this encodingTesting
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
The fix is minimal and consistent with the encoding pattern already used by
deploySingleFunctionanddeleteSingleFunctionin the same file. No documentation or architectural changes are needed.🤖 Generated by Claude | 2026-03-19 14:30 UTC