Skip to content

Conversation

@pipiaha
Copy link

@pipiaha pipiaha commented Sep 27, 2024

This pull request introduces a new ErrorWrapper interface and its default implementation to handle error serialization and deserialization more effectively. The changes impact multiple files, primarily focusing on the serialize package and its integration with the Builder struct.

Error Handling Improvements:

  • Added ErrorWrapper interface and its default implementation pitayaErrWrapper to handle custom error serialization and deserialization. (pkg/serialize/serializer.go) [1] [2]
  • Updated GetErrorFromPayload and GetErrorPayload functions to use the new DefaultErrWrapper for error handling. (pkg/util/util.go)

Builder Enhancements:

  • Added ErrWrapper field to the Builder struct to allow custom error wrappers. (pkg/builder.go)
  • Modified the Build method to set the DefaultErrWrapper if ErrWrapper is provided. (pkg/builder.go)

Dependency Updates:

  • Updated imports to include necessary packages for the new error handling functionality. (pkg/serialize/serializer.go)

also see #371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant