log icon indicating copy to clipboard operation
log copied to clipboard

json handler: Unsupported type serializing oauth error

Open dpup opened this issue 6 years ago • 1 comments

One of the errors dispatched by the oauth2 library contains a http.Response which causes the following error:

error logging: json: unsupported type: func() (io.ReadCloser, error)

This feels like something WithError(err) should handle gracefully, otherwise knowledge of underlying error types needs to be propagated throughout the code.

I'm happy to submit a patch, but not sure what the best solution for this is. Guidance welcome.

dpup avatar Jan 25 '18 22:01 dpup

Hmm sounds like it's just not serializable as JSON, I don't think there's much we could do here, but otherwise I agree, seems like it was just a weird choice for the error's concrete type. I'd open an issue with them as well

tj avatar Feb 07 '18 23:02 tj