store.go's saveNewEtsyUser (called at the end of HandleNewAuthCode) has a CTE insert that cannot run as written:
missing AS after WITH new_user
VALUE instead of VALUES on the second insert
the second insert into etsy_access_tokens never selects user_id from the new_user CTE, so it can't satisfy etsy_access_tokens.user_id NOT NULL
This means the OAuth connection flow - the one piece of Etsy that's supposedly already built - fails the moment someone completes a real sign-in. There's no test coverage in domains/platforms/etsy today (see #31) that would have caught this.
Fix the query to properly thread user_id from the new_user CTE into the etsy_access_tokens insert.
`store.go`'s `saveNewEtsyUser` (called at the end of `HandleNewAuthCode`) has a CTE insert that cannot run as written:
- missing `AS` after `WITH new_user`
- `VALUE` instead of `VALUES` on the second insert
- the second insert into `etsy_access_tokens` never selects `user_id` from the `new_user` CTE, so it can't satisfy `etsy_access_tokens.user_id NOT NULL`
This means the OAuth connection flow - the one piece of Etsy that's supposedly already built - fails the moment someone completes a real sign-in. There's no test coverage in `domains/platforms/etsy` today (see #31) that would have caught this.
Fix the query to properly thread `user_id` from the `new_user` CTE into the `etsy_access_tokens` insert.
angel
added this to the Etsy Integration milestone 2026-08-20 23:30:07 -06:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
store.go'ssaveNewEtsyUser(called at the end ofHandleNewAuthCode) has a CTE insert that cannot run as written:ASafterWITH new_userVALUEinstead ofVALUESon the second insertetsy_access_tokensnever selectsuser_idfrom thenew_userCTE, so it can't satisfyetsy_access_tokens.user_id NOT NULLThis means the OAuth connection flow - the one piece of Etsy that's supposedly already built - fails the moment someone completes a real sign-in. There's no test coverage in
domains/platforms/etsytoday (see #31) that would have caught this.Fix the query to properly thread
user_idfrom thenew_userCTE into theetsy_access_tokensinsert.