|
|
@@ -10,9 +10,11 @@ const debug = process.env.NODE_ENV !== 'production'; |
|
|
|
|
|
|
|
const mutations = { |
|
|
|
API_FAILURE(state, error) { |
|
|
|
OC.Notification.showTemporary(t('settings','An error occured during the request. Unable to proceed.')); |
|
|
|
let message = error.error.response.data.ocs.meta.message; |
|
|
|
OC.Notification.showHtml(t('settings','An error occured during the request. Unable to proceed.')+'<br>'+message, {timeout: 7}); |
|
|
|
// throw to raise exception of the promise and allow a `.then` in the Vue methods |
|
|
|
throw error; |
|
|
|
console.log(state, error); |
|
|
|
throw new Error(error); |
|
|
|
} |
|
|
|
}; |
|
|
|
|