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

Unify API runmtime exceptions on masker when invalid JSON is provided #98

Closed
Breus opened this issue Mar 25, 2024 · 0 comments · Fixed by #99
Closed

Unify API runmtime exceptions on masker when invalid JSON is provided #98

Breus opened this issue Mar 25, 2024 · 0 comments · Fixed by #99
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Breus
Copy link
Owner

Breus commented Mar 25, 2024

Currently, calling JsonMasker.mask(String or byte[]) can give two results:

  1. In case valid JSON was provided, valid JSON is returned according to the provided masking configurations
  2. In case invalid JSON was provided, some runtime exception is thrown

The second case can be caused by multiple cases (e.g. IllegalStateException or ArrayOutOfBoundException).

This should be unified such that the API can give two results:

  1. Unchanged
  2. An InvalidJsonException runtime exception is thrown
@Breus Breus added this to the v1.0.0 milestone Mar 25, 2024
@Breus Breus self-assigned this Mar 25, 2024
@Breus Breus added the enhancement New feature or request label Mar 25, 2024
@Breus Breus linked a pull request Mar 25, 2024 that will close this issue
@Breus Breus closed this as completed in #99 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant