Skip to content
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

[Schema Registry Avro] Consider wrapping avsc errors #20072

Closed
deyaaeldeen opened this issue Jan 26, 2022 · 0 comments · Fixed by #21024
Closed

[Schema Registry Avro] Consider wrapping avsc errors #20072

deyaaeldeen opened this issue Jan 26, 2022 · 0 comments · Fixed by #21024
Assignees
Milestone

Comments

@deyaaeldeen
Copy link
Member

@azure/schema-registry-avro depends on avsc, a third party package for Avro encoding, and it throws exceptions in certain cases. If in the future we decide to switch away from avsc to some other library, @azure/schema-registry-avro will be throwing new and different exceptions.

To get around this issue, consider wrapping avsc exceptions in @azure/schema-registry-avro exceptions so that the customer experience stays consistent regardless of which Avro library to use.

@deyaaeldeen deyaaeldeen added this to the [2022] March milestone Jan 26, 2022
@deyaaeldeen deyaaeldeen self-assigned this Jan 26, 2022
deyaaeldeen added a commit that referenced this issue Mar 25, 2022
### Packages impacted by this PR
@azure/schema-registry-avro

### Issues associated with this PR
Fixes #20072

### Describe the problem that is addressed by this PR
@azure/schema-registry-avro depends on avsc, a third party package for Avro encoding, and it throws exceptions in certain cases. If in the future we decide to switch away from avsc to some other library, @azure/schema-registry-avro will be throwing new and different exceptions.

### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

- Wrapping avsc exceptions in @azure/schema-registry-avro exceptions so that the customer experience stays consistent regardless of which Avro library to use. One question remain: should one exception suffice or should fine-grained exceptions provided?

### Are there test cases added in this PR? _(If not, why?)_
Yes

### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_
- [x] Added a changelog (if necessary)
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-js that referenced this issue Aug 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant