Skip to content

Commit

Permalink
handle 423
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Nov 4, 2024
1 parent face099 commit 795ba12
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/boot/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ export default function ({ app, router }) {
text = error.response.data.detail;
}
// catch all for other 400 error messages
else if (error.response.status >= 400 && error.response.status < 500) {
else if (
error.response.status >= 400 &&
error.response.status < 500 &&
error.response.status !== 423
) {
if (error.config.responseType === "blob") {
text = (await error.response.data.text()).replace(/^"|"$/g, "");
} else if (error.response.data.non_field_errors) {
Expand All @@ -90,7 +94,7 @@ export default function ({ app, router }) {
}
}

if (text || error.response) {
if ((text || error.response) && error.response.status !== 423) {
Notify.create({
color: "negative",
message: text ? text : "",
Expand Down

0 comments on commit 795ba12

Please sign in to comment.