fix(api): improve error message for file not found in GetAgentSkillFile#500
Merged
GenerQAQ merged 1 commit intomemodb-io:devfrom Mar 27, 2026
Merged
Conversation
Previously, when a skill file was not found, the API returned: - HTTP 404 status code - Generic "database error" message (from serializer.DBErr) This was confusing because: 1. The user didn't know if it was a database issue or file missing 2. "database error" sounds like a server-side problem Now it returns: - HTTP 404 status code - Clear "file not found" message This helps users understand that the requested file simply doesn't exist in the skill, rather than encountering a database error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
LGTM |
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.
Why we need this PR?
When calling
get_skill_filefor a non-existent file, the API returns a confusing "database error" message. Users can'ttell if it's a server-side database issue or simply a missing file.
Describe your solution
Changed the error response in
GetAgentSkillFilehandler to return a clear "file not found" message instead of thegeneric "database error".
Previously:
APIError: 404: database error
Now:
APIError: 404: file not found
Implementation Tasks
GetAgentSkillFilehandler to use clear error messageImpact Areas
Which part of Acontext would this feature affect?
Checklist
devbranch.