Skip to content

Commit

Permalink
fix(#876): process 400 response detail properly
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jan 7, 2022
1 parent e3ee89e commit f59ea94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/plugins/vuex-orm-axios.js
Expand Up @@ -46,6 +46,11 @@ export default ({ $axios, app }) => {

switch (code) {
case 400:
Notification.dispatch("notify", {
message: "Error: " + error.response.data.detail,
type: "error",
});
break;
case 422:
(error.response.data.detail || [undefined]).forEach(({ msg }) => {
Notification.dispatch("notify", {
Expand Down

0 comments on commit f59ea94

Please sign in to comment.