natemoo-re / natemoo-re

Home Page:https://status.nmoo.dev/now-playing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR Unhandled Promise Rejection

fklement opened this issue · comments

After I deployed the code with the needed env vars I'm getting the following error:

[GET] /now-playing
14:13:34:88
2020-07-28T12:13:35.142Z	983468e7-3e36-4292-b401-aa7a6d42a31b	ERROR	Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"TypeError: Cannot read property 'item' of undefined","reason":{"errorType":"TypeError","errorMessage":"Cannot read property 'item' of undefined","stack":["TypeError: Cannot read property 'item' of undefined","    at default_1 (/vercel/276075b8/api/now-playing.ts:9:5)","    at processTicksAndRejections (internal/process/task_queues.js:97:5)","    at Server.<anonymous> (/var/task/___now_helpers.js:873:13)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: TypeError: Cannot read property 'item' of undefined","    at process.<anonymous> (/var/runtime/index.js:35:15)","    at process.emit (events.js:322:22)","    at process.emit (/var/task/__sourcemap_support.js:2561:21)","    at processPromiseRejections (internal/process/promises.js:209:33)","    at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}
Unknown application error occurred
commented

#7 fixes this.

use SPOTIFY_CLIENT_SECRET in env vars.

@darkmtr Ahh thanks. Just overlooked your PR 😅