server: ajaxUtil: returns after error sent

This commit is contained in:
Jesse Chan
2020-12-10 01:35:10 +08:00
parent 5aeeceef58
commit 0878817c5a
+1
View File
@@ -15,6 +15,7 @@ export const getResponseFn = (res: Response) => <D extends unknown>(data: D, err
if (typeof error === 'string') {
res.status(500).json(Error(error));
return;
}
res.status(500).json(error);