feat: implement gas and delivery admin systems
This commit is contained in:
19
frontend/delivery_admin/src/utils/error-report.ts
Normal file
19
frontend/delivery_admin/src/utils/error-report.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import axios from 'axios';
|
||||
import type { App, ComponentPublicInstance } from 'vue';
|
||||
|
||||
export default function setupErrorReport(app: App, baseUrl: string) {
|
||||
if (!baseUrl) {
|
||||
return;
|
||||
}
|
||||
app.config.errorHandler = (
|
||||
err: unknown,
|
||||
instance: ComponentPublicInstance | null,
|
||||
info: string,
|
||||
) => {
|
||||
axios.post(`${baseUrl}/report-error`, {
|
||||
err,
|
||||
instance,
|
||||
info,
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user