Skip to content

Allow returning arbitrary errors #159

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

konstin
Copy link

@konstin konstin commented May 23, 2025

Add MockBuilder::respond_with_err to respond with an arbitrary Rust error instead of an HTTP error.

Due to overlapping impl constraints, RespondErr only supports passing a function that returns an error and not the error itself.

Fixes #149

Add `MockBuilder::respond_with_err` to respond with an arbitrary Rust error instead of an HTTP error.

Due to overlapping impl constraints, `RespondErr` only supports passing a function that returns an error and not the error itself.

Fixes LukeMathWalker#149
@konstin
Copy link
Author

konstin commented May 23, 2025

btw I had some trouble with my autoformatter as there are lines with trailing whitespace in the docstrings.

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.

Simulate fault
1 participant