Comment by geo1088 on 06/02/2020 at 21:24 UTC
12 upvotes, 1 direct replies (showing 1)
View submission: Upcoming API change: POST /api/submit
This looks great, thanks for the update!
Is there any list of all the possible requirements and associated error codes (e.g. `SUBMIT_VALIDATION_TITLE_REQUIREMENT`) for API consumers?
Replies
Comment by kemitche at 06/02/2020 at 21:33 UTC
11 upvotes, 2 direct replies
Great question! I'll share most/all of the current ones here. Note that the list may get added to in the future without notice. Clients should forward any unknown errors to the user, as these errors are generally intended to be something the end user can correct.
- SUBMIT_VALIDATION_BODY_BLACKLISTED_STRING: Self post body may not include the indicated word(s)
- SUBMIT_VALIDATION_TITLE_BLACKLISTED_STRING: Title may not include the indicated word(s)
- SUBMIT_VALIDATION_MIN_LENGTH: Title is too short
- SUBMIT_VALIDATION_MAX_LENGTH: Title is too long
- SUBMIT_VALIDATION_BODY_REQUIRED: Self post body is required
- SUBMIT_VALIDATION_BODY_NOT_ALLOWED: Self post body is disallowed
- SUBMIT_VALIDATION_LINK_WHITELIST: Link must be from one of these domains
- SUBMIT_VALIDATION_LINK_BLACKLIST: Link must NOT be from any of these domains
- SUBMIT_VALIDATION_REPOST: Link may not be reposted within this subreddit
- SUBMIT_VALIDATION_FLAIR_REQUIRED: Flair must be added at submission time