mirror of
https://github.com/titaniumnetwork-dev/Ultraviolet.git
synced 2025-05-17 05:20:01 -04:00
only show error string on page requests
This commit is contained in:
parent
d70d089f39
commit
ba0dbbd83a
1 changed files with 4 additions and 0 deletions
|
@ -249,7 +249,11 @@ class UVServiceWorker extends Ultraviolet.EventEmitter {
|
|||
statusText: responseCtx.statusText,
|
||||
});
|
||||
} catch (err) {
|
||||
if (!['document', 'iframe'].includes(request.destination))
|
||||
return new Response(undefined, { status: 500 });
|
||||
|
||||
console.error(err);
|
||||
|
||||
return new Response(err.toString(), {
|
||||
status: 500,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue