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

Allow passing a cause to predefined error functions #83

Merged
merged 6 commits into from
Apr 17, 2023
Merged

Commits on Apr 17, 2023

  1. Allow passing a cause to predefined error functions

    This allows passing an `Error` class object to one of the predefined error functions as defined in `rpcErrors` and `providerErrors`. Upon calling the `serialise` function of the `JsonRpcError` class, the cause error will be serialised using the `serializeCause` function.
    Mrtenz committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    0e60e06 View commit details
    Browse the repository at this point in the history
  2. Add tests to ensure error.serialize().data is not an instance of Error

    The expect function ensures that the type of error.serialize().data is an object and contains specific serialized data while ensuring it does not contain an error instance. This test is necessary to avoid unexpected errors during exception handling.
    Mrtenz committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    0a1ec89 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
    Mrtenz and FrederikBolding authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    5810698 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fdf8f85 View commit details
    Browse the repository at this point in the history
  5. Fix type errors

    Mrtenz committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    17c55ba View commit details
    Browse the repository at this point in the history
  6. Update coverage tresholds

    Mrtenz committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    7fc5e7b View commit details
    Browse the repository at this point in the history