feat: improve error returning and parsing logic
This commit is contained in:
parent
234020eec5
commit
6a94e815f2
7 changed files with 56 additions and 38 deletions
|
|
@ -19,10 +19,13 @@ export function data400(message: string) {
|
|||
}
|
||||
|
||||
export function data403(message: string) {
|
||||
return data({
|
||||
success: false,
|
||||
message,
|
||||
});
|
||||
return data(
|
||||
{
|
||||
success: false,
|
||||
message,
|
||||
},
|
||||
{ status: 403 },
|
||||
);
|
||||
}
|
||||
|
||||
export function data404(message: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue