Commit 205e25a4 authored by Adrian's avatar Adrian

Modificando el service

parent c889fee6
......@@ -24,6 +24,7 @@ export default {
const Message = instance.$message;
const Storage = instance.$storage;
const Confirm = instance.$confirm;
const Waiting = instance.$waiting;
const getUrl = (url, id) => {
id = typeof id === 'string' || typeof id === 'number' ? `${id}` : '';
......@@ -192,8 +193,9 @@ export default {
response => response,
error => {
if (error.response) {
if ([400, 500].includes(error.response.status)) {
const message = error.message || 'Ocurrio un error';
if ([400, 500, 412].includes(error.response.status)) {
const message = error.response.data.mensaje || error.message || 'Ocurrio un error';
Waiting(false);
Message.error(message);
}
if (error.response.status === 401) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment