basecamp / basecamp/basecamp-sdk
Spec: model the bare {field: [messages]} error bodies (webhooks, chat integrations, message types, lineup markers)
- Dominant language
- Go
- Stars
- 49
- Forks
- 12
- Avg merge
- 20h 47m
- Merged PRs (30d)
- 89
Description
Follow-up to #527 / #549. Four controller families render Rails errors **bare** — `render json: @record.errors` with no `errors` wrapper — which the SDK spec currently describes as flat `{error}` bodies:
| Controller (bc3 @ d0edc128) | Status | SDK ops affected |
|---|---|---|
| `webhooks_controller.rb:31,48` | 400 | CreateWebhook / UpdateWebhook (declared `BadRequestError`) |
| `chats/integrations_controller.rb:32,49` | 400 | chat integrations |
| `concerns/category_actions.rb:33,63` | 400 | message types |
| `lineup/markers_controller.rb:32,49` | 422 | lineup markers |
The transports now *parse* this shape correctly (SPEC §6 step 5, conformance-pinned by "400 bare field-map body flattened"), so this is purely contract truthfulness. Modeling needs a new Smithy error shape whose single member is a direct `FieldErrorMap` — per the BookmarkStatus-treatment note on `FieldValidationError` (spec/basecamp.smithy:373-375), a direct map member unwraps to the bare map, which is exactly this wire shape.
Contributor guide
Research direction
Start with spec/basecamp.smithy:373-375 and the BookmarkStatus treatment of FieldValidationError, then review the four listed controller locations and the conformance case “400 bare field-map body flattened.” Done means the Smithy model accurately represents the bare field-map bodies for the listed webhook, chat integration, message type, and lineup marker operations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100