FHIR Chat · Error class in STU3 · dotnet

Stream: dotnet

Topic: Error class in STU3


view this post on Zulip Yunwei Wang (Aug 25 2017 at 21:19):

In my previous DSTU2 implementation, I used Error.BadRequest(...) to create BadRequestExceptioon. When I upgrade to the latest STU3, I noticed the method is removed. So what method should I use to replace BadRequest()?

view this post on Zulip Brian Postlethwaite (Aug 27 2017 at 08:54):

The namespace for the extension may have moved. (not sure though)

view this post on Zulip Yunwei Wang (Aug 28 2017 at 14:27):

The class is still there. But the BadRequest() method is removed.

view this post on Zulip Michel Rutten (Aug 29 2017 at 09:34):

Hi @Yunwei Wang, I did find a unit test that verifies that the server returns a Bad Request status code (method "InvokeResourceValidation"):
https://github.com/ewoutkramer/fhir-net-api/blob/0573e36a0ccccb3b95b958ddc2dd493acd1dce13/src/Hl7.Fhir.Core.Tests/Rest/OperationsTests.cs
Apparently, the test expects the client to throw a FhirOperationException with status property value equal to BadRequest.

view this post on Zulip Yunwei Wang (Aug 30 2017 at 14:25):

Hi @Michel Rutten Thank you.


Last updated: Apr 12 2022 at 19:14 UTC