fix(api): fix database error handler function
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user