Skip to content

Commit

Permalink
Merge pull request #844 from Pyrobolser/patch-1
Browse files Browse the repository at this point in the history
Change error message in FlurlClientCache.Get if client exists but disposed
  • Loading branch information
tmenier authored Oct 16, 2024
2 parents da6121b + af02ad9 commit 93f5668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Flurl.Http/Configuration/FlurlClientCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public virtual IFlurlClient Get(string name) {
throw new ArgumentException($"A client named '{name}' was not found. Either preconfigure the client using Add (typically at startup), or use GetOrAdd to add/configure one on demand when needed.");

if (cli.Value.IsDisposed)
throw new Exception($"A client named '{name}' was not found but has been disposed and cannot be reused.");
throw new Exception($"A client named '{name}' was found but has been disposed and cannot be reused.");

return cli.Value;
}
Expand Down

0 comments on commit 93f5668

Please sign in to comment.