Skip to content

fix(security): Improve error message handling to enhance security#293

Merged
zhb-ai merged 1 commit intodevfrom
feature/plugin-architecture
Apr 11, 2026
Merged

fix(security): Improve error message handling to enhance security#293
zhb-ai merged 1 commit intodevfrom
feature/plugin-architecture

Conversation

@zhb-ai
Copy link
Copy Markdown
Collaborator

@zhb-ai zhb-ai commented Apr 11, 2026

  • Modify safe_error_response function to prioritize caller-provided safe messages
  • Add default message _GENERIC_4XX for 4xx errors
  • Remove logic that generates client messages directly from exception objects
  • Unify error handling across routes using predefined safe messages
  • Refactor sanitize_db_error_message to use predefined pattern matching for safe errors

- Modify safe_error_response function to prioritize caller-provided safe messages
- Add default message _GENERIC_4XX for 4xx errors
- Remove logic that generates client messages directly from exception objects
- Unify error handling across routes using predefined safe messages
- Refactor sanitize_db_error_message to use predefined pattern matching for safe errors
@zhb-ai zhb-ai merged commit e9ae67f into dev Apr 11, 2026
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