Skip to content

Commit

Permalink
Display error if no [...nextauth].js found
Browse files Browse the repository at this point in the history
  • Loading branch information
jaknas committed Sep 15, 2020
1 parent e6995d2 commit f546a4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ export default async (req, res, userSuppliedOptions) => {
// safe to return and that no more data will be sent.
const done = resolve

if (!req.query.nextauth) {
res
.status(500)
.end(
'Error: Cannot find [...nextauth].js in pages/api/auth. Make sure the filename is written correctly.'
)
return done()
}

const { url, query, body } = req
const {
nextauth,
Expand Down

0 comments on commit f546a4a

Please sign in to comment.