fix(api): fix database error handler function
This commit is contained in:
parent
82134a8cd2
commit
14e88b2e2e
@ -17,6 +17,6 @@ func HandleDBError(err error) (int, string) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return int(status), message
|
return int(status), message
|
||||||
} else {
|
} else {
|
||||||
return 500, message
|
return 400, pgErr.Message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user