Current problem
When making a POST/PATCH request to the This is in contrast to Discord API that will give a more specific error and point you at the key in the payload that's wrong.
/channels/{channel_id}/messages/{message_id} with invalid payload, the API only returns a generic INVALID_FORM_BODY error with no specific information about what it is that was wrong about the request:
{"code" :"INVALID_FORM_BODY" ,"message" :"Invalid form body." ,"errors" :[{"path" :"message_data" ,"message" :"Invalid message data." ,"code" :"INVALID_MESSAGE_DATA" }]}Proposed change
I'd like Fluxer to be more specific about what was wrong about the payload sent to the Create/Modify message endpoint.
Platform
API
Additional information
Here's a few examples from Discord API:
- Request body:Response body:```json{"message": "Invalid Form Body","code": 50035,"errors": {"embeds": {"0": {"author": {"_errors": [{"code": "MODEL_TYPE_CONVERT","message": "Expected an object/dictionary."}]}}}}}```
{"content" :"text" ,"embeds" : [{"description" :"text" ,"author" :"wrong type" }]} - Request body:Response body:```json{"message": "Invalid Form Body","code": 50035,"errors": {"embeds": {"_errors": [{"code": "LIST_TYPE_CONVERT","message": "Only iterables may be used in a ListType"}]}}}```
{"content" :"text" ,"embeds" :123 } - Request body:Response body:```json{"message": "Invalid Form Body","code": 50035,"errors": {"tts": {"_errors": [{"code": "BOOLEAN_TYPE_CONVERT","message": "Must be either true or false."}]}}}```
{"content" :"text" ,"tts" :123 }