mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 15:51:23 +00:00
test: regression coverage for error mapping and client error extraction
- handlers: pgx.ErrNoRows→404, InputError→400 with message preserved, pgconn 23505→409 without constraint/SQLSTATE leak, unknown→500 - services: export NewInputError so error construction is testable - frontend: vitest for errorMessage helper — server reason preferred, status text and fallbacks verified Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
89f3d84234
commit
a71baa49cd
3 files changed
+78
No files matched your search
@@ -1534,6 +1534,8 @@ type InputError struct{ msg string }
|
||||
|
||||
func (e *InputError) Error() string { return e.msg }
|
||||
|
||||
func NewInputError(msg string) error { return &InputError{msg: msg} }
|
||||
|
||||
func inputErrorf(format string, args ...any) error {
|
||||
return &InputError{msg: fmt.Sprintf(format, args...)}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user