mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
9 lines
196 B
TypeScript
9 lines
196 B
TypeScript
import {createHttpError} from "network/createHttpError";
|
|
|
|
export function checkHttpResponseStatus(res: Response) {
|
|
if (res.ok) {
|
|
return res;
|
|
} else {
|
|
throw createHttpError(res);
|
|
}
|
|
}
|