mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 19:03:47 +00:00
refactor: better errors (#590)
* refactor: improve error messages from server
This commit is contained in:
@@ -11,7 +11,6 @@ export function maybeAxiosError(error: unknown) {
|
||||
const statusText = (error as AxiosError).response?.statusText ?? '';
|
||||
let data = (error as AxiosError).response?.data ?? '';
|
||||
if (typeof data === 'object') {
|
||||
// TODO: use error instead, when migrated
|
||||
if ('message' in data) {
|
||||
data = JSON.stringify(data.message);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user