Created
June 17, 2019 14:22
-
-
Save KeKs0r/236e24755fc567633788c934d7636659 to your computer and use it in GitHub Desktop.
Zeit Would swallow issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This actually shows the error in the zeit logs and results in this response | |
/* | |
An error occurred with this application. | |
NO_STATUS_CODE_FROM_LAMBDA | |
*/ | |
async function start() { | |
console.log("Before Server"); | |
const server = require("./server"); | |
console.log("Before Start"); | |
console.time("serverStart"); | |
const { url } = await server.listen(); | |
console.timeEnd("serverStart"); | |
console.log(`๐ Server ready at ${url}`); | |
} | |
start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// THIS WOULD RESULT IN THIS RESPONSE | |
/* | |
A server error has occurred | |
INTERNAL_SERVER_ERROR | |
*/ | |
try { | |
console.log("Before Server"); // Not even this would be in the logs | |
const server = require("./server"); | |
console.log("Before Start"); | |
console.time("serverStart"); | |
server.listen().then(({ url }) => { | |
console.timeEnd("serverStart"); | |
console.log(`๐ Server ready at ${url}`); | |
}); | |
} catch (e) { | |
console.error(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment