Skip to content

Commit

Permalink
Exception is now an argumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasdejong committed Apr 3, 2024
1 parent 357d4a3 commit 9c41030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hl7.Fhir.Base/Rest/BaseFhirClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ private static ResourceIdentity verifyResourceIdentity(Uri location, bool needId
// either msg or entryComponent should be set
private async Task<TResource?> extractResourceFromHttpResponse<TResource>(IEnumerable<HttpStatusCode> expect, HttpResponseMessage responseMessage, HttpRequestMessage? msg = null, Bundle.EntryComponent? entryComponent = null) where TResource : Resource
{
if (msg is null && entryComponent is null) throw new InvalidOperationException("Either msg or entryComponent must be set");
if (msg is null && entryComponent is null) throw new ArgumentException("Either msg or entryComponent should be set");
// Validate the response and throw the appropriate exceptions. Also, if we have *not* verified the FHIR version
// of the server, add a suggestion about this in the (legacy) parsing exception.
var suggestedVersionOnParseError = !Settings.VerifyFhirVersion ? fhirVersion : null;
Expand Down

0 comments on commit 9c41030

Please sign in to comment.