[channels] Return ApiError from Discord interaction failures

Open Beginner friendly
#637 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read docs/core/communication.md and docs/core/protocol.md for the required error shape, then inspect apps/nanocore/src/discord-interaction-routes.ts. Update the route to return the existing ApiError schema with protocolVersion, preserving signature verification and interaction dispatch. Done when failures from this route match the documented top-level protocol error record.

Written by the indexing model from the issue text.

Description

after-v0.1.0 bug

Doc rule. docs/core/communication.md:289 says HTTP-style commands normalize user-visible failures into the protocol error shape. docs/core/protocol.md:637-639 defines that shape as a top-level record with protocolVersion and code.

Current code. apps/nanocore/src/discord-interaction-routes.ts:22-24 returns { error: { code, message } } with no protocolVersion.

Impact. One channel's failures do not match the error record other HTTP clients parse. Discord behavior otherwise stays on this route.

Smallest fix. Return the existing ApiError schema from this route, including protocolVersion. Do not change Discord signature verification or interaction dispatch.

Source finding IDs. DOC-C-08

Filed from the 2026-11-07 core-doc audit (base 27fb8a0013ec86729475617609e9acc3fcb376f3); deferred past v0.1.0 by coordinator + Astra adjudication.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
5h 57m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lingkaix/openkit

All issues in lingkaix/openkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.