plugAPI
plugAPI copied to clipboard
Errors in callback functions passed to playlist methods are mishandled
When managing playlists, if you have some error in your callback method, such as a missing module import in your own code, the bot will print 11 REST Warnings before giving the error back to the console.
Example:
06:48:16s 627ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 2/10
06:48:20s 673ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 3/10
06:48:26s 271ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 4/10
06:48:40s 841ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 5/10
06:49:07s 728ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 6/10
06:49:53s 825ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 7/10
06:51:55s 726ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 8/10
06:55:44s 864ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 9/10
07:00:10s 859ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 10/10
07:10:49s 242ms [Warning] [REST Warning] Route: https://plug.dj/_/playlists/9084662/media/insert sendREST attempt 11/10
07:10:49s 386ms [Error] [REST Error] Route: https://plug.dj/_/playlists/9084662/media/insert ReferenceError: logger is not defined Guest Mode: false
Needing to wait 12 minutes to get a ReferenceError from your own code is not condusive to rapid development ;)
issue should be resolved with https://github.com/plugCubed/plugAPI/commit/6b449073cf149759b17ef23c6dd641580b8beedd
Will release once done fixing other bugs that pop up
Hasn't this landed?