Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Aug 18, 2023
1 parent 24b9c51 commit 0adc5e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration-tests/js-compute/test-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export let FASTLY_SERVICE_VERSION;
*/
async function app(event) {
let res = new Response('Internal Server Error', { status: 500 });
const path = (new URL(event.request.url)).pathname
try {
const path = (new URL(event.request.url)).pathname
console.log(`path: ${path}`)
FASTLY_SERVICE_VERSION = env('FASTLY_SERVICE_VERSION') || 'local'
console.log(`FASTLY_SERVICE_VERSION: ${FASTLY_SERVICE_VERSION}`)
Expand All @@ -26,7 +26,7 @@ async function app(event) {
res = fail(`${path} endpoint does not exist`)
}
} catch (error) {
res = fail(`The routeHandler threw an error: ${error.message || error}` + '\n' + error.stack)
res = fail(`The routeHandler threw an error on path ${path}: ${error.message || error}` + '\n' + error.stack)
} finally {
res.headers.set('fastly_service_version', FASTLY_SERVICE_VERSION);
}
Expand Down

0 comments on commit 0adc5e3

Please sign in to comment.