@graphteon/juricode
Version:
We are forging the future with lines of digital steel
9 lines • 495 B
JavaScript
export const isAxiosErrorWithErrorField = (error) => typeof error.response?.data === "object" &&
error.response?.data !== null &&
"error" in error.response.data &&
typeof error.response?.data?.error === "string";
export const isAxiosErrorWithMessageField = (error) => typeof error.response?.data === "object" &&
error.response?.data !== null &&
"message" in error.response.data &&
typeof error.response?.data?.message === "string";
//# sourceMappingURL=type-guards.js.map