Skip to content

fix(api): improve error message for file not found in GetAgentSkillFile#500

Merged
GenerQAQ merged 1 commit intomemodb-io:devfrom
mbt1909432:fix/improve-file-not-found-error-message
Mar 27, 2026
Merged

fix(api): improve error message for file not found in GetAgentSkillFile#500
GenerQAQ merged 1 commit intomemodb-io:devfrom
mbt1909432:fix/improve-file-not-found-error-message

Conversation

@mbt1909432
Copy link
Copy Markdown
Contributor

@mbt1909432 mbt1909432 commented Mar 27, 2026

Why we need this PR?

This should close Issue (N/A)

When calling get_skill_file for a non-existent file, the API returns a confusing "database error" message. Users can't
tell if it's a server-side database issue or simply a missing file.

Describe your solution

Changed the error response in GetAgentSkillFile handler to return a clear "file not found" message instead of the
generic "database error".

Previously:
APIError: 404: database error

Now:
APIError: 404: file not found

Implementation Tasks

  • Modified GetAgentSkillFile handler to use clear error message
  • Tested manually

Impact Areas

Which part of Acontext would this feature affect?

  • Client SDK (Python)
  • Client SDK (TypeScript)
  • Core Service
  • API Server
  • Dashboard
  • CLI Tool
  • Documentation
  • Other: ...

Checklist

  • Open your pull request against the dev branch.
  • All tests pass in available continuous integration systems (e.g., GitHub Actions).
  • Tests are added or modified as needed to cover code changes.

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>
@mbt1909432 mbt1909432 requested a review from a team as a code owner March 27, 2026 03:45
@GenerQAQ
Copy link
Copy Markdown
Contributor

LGTM

@GenerQAQ GenerQAQ merged commit 5408de7 into memodb-io:dev Mar 27, 2026
3 checks passed
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