Getting 500_service_error on slack-bot worker demo

I’ve been trying to complete the slack-bot tutorial and I keep getting ‘500_service_error’ when I try to run the /issue command in slack. Using Postman, I can post to slack with my webhook, and I can retrieve the info I want from my git repo, but I cannot get the worker to, well, work. I have no way of debugging my worker and I have not been able to find any logs that show what is causing the error. I’d really like to use the workers, but I find that I really need to have a good working example to help wrap my brain around the whole process.
Also, when I try to look at the slack-bot work, there is no preview available and the link to the worker returns ‘resource not found’ when I open it in a browser.

Are there any debug tools available? Logs?



I was able to get this working. There were a few issues on my side with getting the git call to work. Once I did that though, I did find two other bugs in the default code.
1)The construct Slack message call expects 3 arguments but in the lookup.js it is missing the third (prefix_text). I defaulted the signature for a defualt empty string (prefix_text = ‘’)
2) The regex parsing code does not seem to work in the worker. Anytime I passed the results back it always came up ‘null’. I tested the code in the Chrome console and it does work, it just doesn’t work in the actual worker. I changed it to split on ‘/’ and pass in ‘owner/project/issue’.

For those new to workers, the way I was able to debug this is was to make sure that I put a try/catch around every section of code I could. I would send back the error.message in the Response so that I could figure out what was going on. It would be nice if they had a debugger of some kind or a logging function, but that should do for now.

Hey @ericklind, thanks for the update! I’ll look over the tutorial and see if we can fix this stuff up. Appreciate it!