Skip to content

fix: prevent double response in addAlbum when artistIdFromName throws#170

Open
jakebromberg wants to merge 2 commits intomainfrom
fix/9-addalbum-double-response
Open

fix: prevent double response in addAlbum when artistIdFromName throws#170
jakebromberg wants to merge 2 commits intomainfrom
fix/9-addalbum-double-response

Conversation

@jakebromberg
Copy link
Member

Summary

  • Missing return after next(e) in the catch block caused execution to fall through
  • This triggered a second response via res.send(), causing ERR_HTTP_HEADERS_SENT

Test plan

  • Unit test: mock artistIdFromName to throw, assert res.send is not called after next(e)

Made with Cursor

Missing return after next(e) caused execution to fall through to
res.send(), triggering ERR_HTTP_HEADERS_SENT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jakebromberg jakebromberg force-pushed the fix/9-addalbum-double-response branch from f58a580 to b7fd3c3 Compare February 27, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant