I'm trying to figure out how I am supposed to use jsonapi to unmarshal an error response I got from my API: ``` { "message": "User could not be updated", "errors": [ { "code": "E23", "source": { "pointer": "/data/attributes/email" }, "title": "Error Title", "detail": "More detailed error message", "meta": { // object with meta data } } ] } ``` I first tried ```go item := new(jsonapi.ErrorsPayload) err = jsonapi.UnmarshalPayload(errorBody, item) ``` but this does not work, because `jsonapi.UnmarshalPayload` does expect a `data` attribute (https://github.com/google/jsonapi/blob/master/request.go#L71). At this point I got lost and I'm not sure how this is supposed to be used...
I'm trying to figure out how I am supposed to use jsonapi to unmarshal an error response I got from my API:
I first tried
but this does not work, because
jsonapi.UnmarshalPayloaddoes expect adataattribute (https://github.com/google/jsonapi/blob/master/request.go#L71). At this point I got lost and I'm not sure how this is supposed to be used...