aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/lib/models/internal/KnownProblem.ts
blob: ee1c830995f4045ee8ab22dad4f106918cbf7f5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
export type KnownProblem = {
    title: string,
    subtitle: string,
    errors: Array<[string, string]>,
    traceId: string,
}

export function is_known_problem(response: any): boolean {
    return (response.data.hasOwn("title")
        && response.data.hasOwn("subtitle")
        && response.data.hasOwn("errors")
        && response.data.hasOwn("traceId"));
}