File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,7 +229,12 @@ export default {
229229
230230 if (this .$config .get (' isFormBlueprint' )) url += ' &forms=true' ;
231231
232- this .$axios .get (url).then ((response ) => (loadedFieldtypes .value = response .data ));
232+ this .$axios .get (url)
233+ .then ((response ) => (loadedFieldtypes .value = response .data ))
234+ .catch ((e ) => {
235+ this .$toast .error (e .response ? .data ? .message || __ (' Something went wrong' ));
236+ this .close ();
237+ });
233238 },
234239
235240 methods: {
Original file line number Diff line number Diff line change @@ -366,7 +366,7 @@ export default {
366366 this .errors = errors;
367367 this .$toast .error (message);
368368 } else {
369- this .$toast .error (__ (' Something went wrong' ));
369+ this .$toast .error (e . response ? . data ? . message || __ (' Something went wrong' ));
370370 }
371371 },
372372
@@ -396,6 +396,10 @@ export default {
396396 this .meta = { ... response .data .meta };
397397 this .originValues = response .data .originValues ;
398398 this .originMeta = response .data .originMeta ;
399+ })
400+ .catch ((e ) => {
401+ this .loading = false ;
402+ this .handleAxiosError (e);
399403 });
400404 },
401405 },
Original file line number Diff line number Diff line change @@ -60,12 +60,18 @@ export default {
6060 value: this .value ,
6161 };
6262
63- this .$axios .post (cp_url (' fields/field-meta' ), params).then ((response ) => {
64- this .meta = response .data .meta ;
65- this .value = response .data .value ;
66- this .loading = false ;
67- this .$emit (' loaded' );
68- });
63+ this .$axios
64+ .post (cp_url (' fields/field-meta' ), params)
65+ .then ((response ) => {
66+ this .meta = response .data .meta ;
67+ this .value = response .data .value ;
68+ this .loading = false ;
69+ this .$emit (' loaded' );
70+ })
71+ .catch ((e ) => {
72+ this .loading = false ;
73+ this .$toast .error (e .response ? .data ? .message || __ (' Something went wrong' ));
74+ });
6975 },
7076
7177 updateMeta (value ) {
You can’t perform that action at this time.
0 commit comments