chore: reporting
This commit is contained in:
parent
eb3608cf6f
commit
8ea88a0af5
|
@ -30,6 +30,9 @@ export default class Resource extends decorate(Class) {
|
|||
try {
|
||||
if ('client' === process.env.SIDE) {
|
||||
const response = await fetch(join('/', this.root, uri));
|
||||
if (!response.ok) {
|
||||
throw new Error('Not found');
|
||||
}
|
||||
return response.arrayBuffer();
|
||||
}
|
||||
return await new Promise((resolve, reject) => {
|
||||
|
@ -45,7 +48,7 @@ export default class Resource extends decorate(Class) {
|
|||
});
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`Error reading ${JSON.stringify(uri)}: ${error.message}`);
|
||||
throw new Error(`Resource: ${JSON.stringify(uri)}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user