createModDiscussionConversation masks the 10000-char body limit as "struct field 'service' doesn't exist"
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
Research direction
Start at the GenericPluginClient.CreateModmailConversation entry point and reproduce the oversized body case, comparing its response handling with reddit.modMail.reply and GenericPluginClient.CreateConversationMessage. Done means a 10001-character body surfaces the clear validation error, while a 10000-character body still succeeds.
Written by the indexing model from the issue text.
Description
Summary
reddit.modMail.createModDiscussionConversation(...) with a bodyMarkdown over the modmail length limit fails with an unhelpful gRPC response-parse error instead of reporting the limit. reddit.modMail.reply(...) with the same oversized body reports it clearly; the create path masks the real error.
Environment
@devvit/web0.13.4 (Devvit Web / server)
Reproduction
import { context, reddit } from '@devvit/web/server';
// one character over the limit
const body = 'A'.repeat(10001);
// (1) create: cryptic parse error
await reddit.modMail.createModDiscussionConversation({
subject: 'x',
bodyMarkdown: body,
subredditId: context.subredditId,
});
// (2) reply (same body): clear error
await reddit.modMail.reply({ conversationId, body, isInternal: true });
Actual
(1) create throws:
2 UNKNOWN: grpc invocation failed with status 2; failed to parse response body: : : struct field for "service" doesn't exist in any of 1 places to unmarshal
at GenericPluginClient.CreateModmailConversation
(2) reply throws (same body):
2 UNKNOWN: grpc invocation failed with status 2; Bad request: This field must be under 10000 characters
Error in field: body
at GenericPluginClient.CreateConversationMessage
Expected
The create path should surface the same clear "This field must be under 10000 characters" error as the reply path (perhaps tolerate unknown fields in the response). The create endpoint appears to deserialize Reddit's 400 into a proto lacking a service field, turning a clear validation error into an opaque parse failure.
Notes
- A body of exactly 10000 chars succeeds (both create and reply); 10001 fails. This means the "must be under 10000 characters" wording is off by one (the real max is 10000 inclusive).
- Confirmed with bodies of 11000 and exactly 10001 characters.
- Searched open/closed issues and PRs for the error string and
createModDiscussionConversation; no existing report.
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reddit/devvit
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·