Closed thi4go closed 4 years ago
Right now, the code is processing requests with unknown json fields that are not specified by the API. DisallowUnknownFields() makes the decoder error out when this happens.
DisallowUnknownFields()
Example of bad request to timestamp:
{ random_field_name: "random value"}
response:
{ "id": "", "servertimestamp": 1575118800, "digests": null, "results": [] }
It should error out with Invalid request payload. This PR fixes this.
Invalid request payload
This is being addressed in #60, so this PR is no longer needed.
Right now, the code is processing requests with unknown json fields that are not specified by the API.
DisallowUnknownFields()
makes the decoder error out when this happens.Example of bad request to timestamp:
response:
It should error out with
Invalid request payload
. This PR fixes this.