2 constructor(title, detail, status) {
10 error instanceof Problem ?
12 new Problem('Bad request', (error.stack || error.message), 400)
17 api_call = async (endpoint, ...args) => {
18 let response = await fetch(
20 {method: 'POST', body: JSON.stringify(args)}
22 let result = await response.json()
24 throw new Problem(result.title, result.detail, result.status)