Right now function can return an error with very generic message. In case when body passes with wrong type.
Can error contains supported types of body that it expected in message, or to make it backward compatible - return custom error with message that is currently returning but with additional field like []string SupportedTypes.
If it make sense - I can submit a PR
Right now function can return an error with very generic message. In case when body passes with wrong type. Can error contains supported types of body that it expected in message, or to make it backward compatible - return custom error with message that is currently returning but with additional field like
[]string SupportedTypes
. If it make sense - I can submit a PR