Skip to content

Unmocked policy: Option to throw error#12

Merged
bstien merged 2 commits intomainfrom
unmocked-policy/throw-error
Oct 7, 2025
Merged

Unmocked policy: Option to throw error#12
bstien merged 2 commits intomainfrom
unmocked-policy/throw-error

Conversation

@bstien
Copy link
Owner

@bstien bstien commented Oct 7, 2025

Why?

fatalError could be too intrusive in some situations, when you just want to stop incoming unmocked requests in place. This PR adds support for throwing a user provided error instead.

What?

  • Add UnmockedPolicy.throwError(Error).
  • Fix logging.

@bstien bstien merged commit b9d64b7 into main Oct 7, 2025
1 check passed
@bstien bstien deleted the unmocked-policy/throw-error branch October 7, 2025 11:51
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