httpin
httpin copied to clipboard
How to know which field is wrong if error?
Without exposing InvalidFieldError from core package how to know which query param is wrong, if I need to have custom error message for end user? Even with CustomErrorHandler it still not possible to separate which query param is wrong in case I need to parse many params in the same time and provide simple error message to the end user
For example:
invalid response
got:
{StatusCode:400 Error:failed to parse request queries: invalid field "ProfileIntegrationID": resolve field "ProfileIntegrationID (string)" failed: execute directive "required" with args [] failed: missing required field}
want:
{StatusCode:400 Error:failed to parse request queries: could not parse ProfileIntegrationID parameter}
End user should not know anything about some "strange" directives, etc. The only option right now is to parse error message as string.