-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Description
When setting over 16 (the limit) rules in membership screening, the error response is formatted wrong.
Steps to Reproduce
PATCH https://discord.com/api/v8/guilds/:id/member-verification with
{
"form_fields": "[{\"field_type\":\"TERMS\",\"label\":\"hello world\",\"values\":[\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\",\"test\"],\"required\":true}]"
}Expected Behavior
an error response like this:
{
"code": 50035,
"errors": {
"form_fields": {
"values": {
"_errors": [
{
"code": "BASE_TYPE_MAX_LENGTH",
"message": "Must be 16 or fewer in length."
}
]
}
}
},
"message": "Invalid Form Body"
}Current Behavior
this error response, with two _errors arrays:
{
"code": 50035,
"errors": {
"form_fields": {
"values": {
"_errors": [
{
"_errors": [
{
"code": "BASE_TYPE_MAX_LENGTH",
"message": "Must be 16 or fewer in length."
}
]
}
]
}
}
},
"message": "Invalid Form Body"
}Screenshots/Videos
Client and System Information
Tested in Postman, first noticed by discord.js not properly handling the error
