-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Add errors.ConjureErrorDecoder interface & instantiable registry type for customizing error deserialization #724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
} | ||
|
||
// ReflectTypeConjureErrorDecoder is a ConjureErrorDecoder that uses reflection to convert JSON errors to their go types. | ||
// It stores a mapping of error name to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: need to finish up the godoc
) | ||
|
||
var registry = map[string]reflect.Type{} | ||
var globalRegistry = NewReflectTypeConjureErrorDecoder() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
Invalidated by push of 94e97db
Released v2.88.0 |
Builds off #716
Part of addressing palantir/conjure-go#415
Used by palantir/conjure-go#636