paperclip/server
Alkim Ake Gozen 78c9d51b81
fix(plugin-ui-static): unwrap DrizzleQueryError when checking for 22P02
The plugin static asset route tries to look up a plugin by UUID first,
catching Postgres error 22P02 (invalid_text_representation) to fall back
to a key-based lookup. However, drizzle-orm wraps all query errors in a
DrizzleQueryError that stores the original error in `.cause` — so
`error.code` is always undefined and the fallback to `getByKey()` never
fires.

Fix by walking the error chain (top-level `code`, then `cause.code`,
recursively) so plugins that embed their key (e.g. `agent-pixels.camera`)
in `/_plugins/:pluginId/` asset URLs are resolved correctly and no longer
return 500.
2026-06-07 23:47:39 +09:00
..
scripts fix(server): use stable tsx/cli entry point in dev-watch 2026-03-28 06:42:03 +07:00
src fix(plugin-ui-static): unwrap DrizzleQueryError when checking for 22P02 2026-06-07 23:47:39 +09:00
CHANGELOG.md chore: release v0.3.1 2026-03-12 13:09:22 -05:00
package.json Add built-in grok_local adapter (#6087) 2026-05-16 09:51:09 -07:00
tsconfig.json Fix root TypeScript solution config 2026-03-09 14:09:30 -05:00
vitest.config.ts Stabilize serialized server route tests (#4448) 2026-04-24 19:27:00 -05:00