mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-05 07:28:01 +00:00
refactor: handle undefined (#479)
This commit is contained in:
@@ -7,7 +7,7 @@ import { nowInMillis } from '../utils/time';
|
||||
|
||||
export function logAxiosError(prepend: string, error: unknown) {
|
||||
const message = axios.isAxiosError(error)
|
||||
? `${prepend}, ${(error as AxiosError).response?.statusText}: ${(error as AxiosError).response?.data}`
|
||||
? `${prepend} ${(error as AxiosError).response?.statusText ?? ''}: ${(error as AxiosError).response?.data ?? ''}`
|
||||
: `${prepend}: ${error}`;
|
||||
|
||||
addLog({
|
||||
|
||||
Reference in New Issue
Block a user