Skip to content

Throw exception on disposed RestClient - #1967

Merged
alexeyzimarev merged 1 commit into
restsharp:devfrom
kendallb:feature/kendallb/throw-on-disposed
Jan 8, 2023
Merged

Throw exception on disposed RestClient#1967
alexeyzimarev merged 1 commit into
restsharp:devfrom
kendallb:feature/kendallb/throw-on-disposed

Conversation

@kendallb

@kendallb kendallb commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

Throw exception on using a disposed RestClient instance. We should always throw this one as it is pretty fatal so you would not want this to silently show up in the Exception response value.

Description

If you try to use a disposed instance right now, you get a silent exception buried inside HttpClient. With this change, it will throw immediately and cause the user code to fail as this is a pretty fatal problem.

Purpose

This pull request is a:

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

… pretty fatal so you would not want this to silently show up in the Exception response value.
@stale

stale Bot commented Jan 7, 2023

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label Jan 7, 2023
@repo-ranger

repo-ranger Bot commented Jan 7, 2023

Copy link
Copy Markdown

⚠️ This issue has been marked wontfix and will be closed in 3 days

@alexeyzimarev
alexeyzimarev merged commit ebf23ed into restsharp:dev Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants