-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
File/code in question:
serverless-toolkit/packages/twilio-run/src/runtime/server.ts
Lines 166 to 198 in 5108d30
if (routeInfo && routeInfo.type === 'function') { | |
const functionPath = routeInfo.filePath; | |
try { | |
if (!functionPath) { | |
throw new Error('Missing function path'); | |
} | |
debug('Load & route to function at "%s"', functionPath); | |
const twilioFunction = loadTwilioFunction(functionPath); | |
if (typeof twilioFunction !== 'function') { | |
return res | |
.status(404) | |
.send( | |
`Could not find a "handler" function in file ${functionPath}` | |
); | |
} | |
if (config.forkProcess) { | |
functionPathToRoute(functionPath, config)(req, res, next); | |
} else { | |
functionToRoute(twilioFunction, config, functionPath)( | |
req, | |
res, | |
next | |
); | |
} | |
} catch (err) { | |
debug('Failed to retrieve function. %O', err); | |
if (err.code === 'ENOENT') { | |
res.status(404).send(`Could not find function ${functionPath}`); | |
} else { | |
res.status(500).send(wrapErrorInHtml(err, functionPath)); | |
} | |
} |
This is something that needs clarification from the Functions team as to what behavior should be expected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working