forgejo-mcp/operation/user
Christoph Görn 19f1efd000
fix: 🐛 owner resource: surface orgErr on transport failure, explicit -32003 on both-404
ownerResourceHandler had two related bugs in the user→org fallback:
- when GetOrg failed with orgResp==nil (network/DNS/context-cancel),
  the handler returned MapForgejoError(uri, userErr), masking the
  real transport error behind the original user 404;
- if userErr happened to be nil (u==nil, err==nil SDK edge), the
  same call produced MapForgejoError(nil)==nil and the handler
  returned (nil, nil), violating MCP semantics.

Surface orgErr on transport failure. On both-404 (or any other
ambiguous outcome) return an explicit *ResourceError with code
-32003.

Closes forgejo-mcp-91j.
Ref PR #172 review https://codeberg.org/goern/forgejo-mcp/pulls/172#issuecomment-16022165
2026-05-28 16:11:26 +02:00
..
notification.go feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
notification_test.go deps: ⬆️ migrate forgejo-sdk from v2 to v3 2026-03-27 23:53:31 +01:00
resources_owner.go fix: 🐛 owner resource: surface orgErr on transport failure, explicit -32003 on both-404 2026-05-28 16:11:26 +02:00
resources_owner_test.go fix: 🐛 owner resource: surface orgErr on transport failure, explicit -32003 on both-404 2026-05-28 16:11:26 +02:00
user.go feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00