mindstalk: (anya bunny)
It is commonly believed that when dealing with an ornery bug, just explaining the problem out loud to someone else often grants insight. "--oh, I see it now, sorry to bother you." So much so that, supposedly, one senior engineer required juniors to explain their problem first to a teddy bear, the 'bug bear', and only if that failed could they bother him.

I haven't actually used this much. Mostly been on my own, and my default approach to bugs is more logging. But I was playing with TypeScript and Koa today, and had a problem that didn't work for: the main code worked fine, but if authentication failed, the server seemed to never respond to the caller.

I was about to find a senior active on Slack, to ask for help, when I thought of the bugbear. I did not have a teddy bear, and I don't think I even said anything out loud, but I did go line by line, trying to mentally verbalize what was happening and what the point was. And yes, found something suspicious: "ctx.response = 401", which looks like it's trying to set a status code but is clobbering the response object. And yes, "cts.response.status = 401" fixed it. Voila! No seniors disturbed.
This account has disabled anonymous posting.
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

mindstalk: (Default)
mindstalk

June 2025

S M T W T F S
123 45 67
89 10 1112 1314
15161718192021
222324 25262728
2930     

Most Popular Tags

Expand Cut Tags

No cut tags

Style Credit

Page generated 2025-07-21 01:53
Powered by Dreamwidth Studios