mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 12:43:48 -04:00
(sentry) do not capture errors from $post, instead send them up the promise chain
This commit is contained in:
parent
4e7dc34634
commit
f0ece7bbae
@ -35,7 +35,6 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import * as Sentry from '@sentry/vue';
|
||||
import dark from '../plugins/dark.js';
|
||||
import sorter from 'avris-sorter';
|
||||
import { sleep } from '../src/helpers.ts';
|
||||
@ -100,9 +99,8 @@ export default {
|
||||
this.$axios.$post(url, data, { ...options, timeout })
|
||||
.then((data) => resolve(data))
|
||||
.catch(async (error) => {
|
||||
Sentry.captureException(error);
|
||||
await this.$alert(this.$t(error.response?.data?.error || 'error.generic'), 'danger');
|
||||
reject();
|
||||
reject(new Error(`POST to ${url} failed: ${error.response?.data?.error || 'unknown error'}`));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user