FHIR CustomBuiltinOperations - handling error 500 in production
Hi,
I've overrided the HS.FHIRServer.Storage.BuiltInOperations class, and generally all works fine except of error handling. Where can I find a server setting option to ask IRIS to return OperationOutcome if an Internal Server Error occurs? Currently it returns non-informative HTML instead of JSON/OperationOutcome.
Product version: IRIS 2022.3
Are you setting Accept header in request to application/json?
I'm using Postman, the default Accept header value was
*/*
, then according your advice I tried application/json, then application/fhir+json, both not working, IRIS still produces HTMLIIS?
Thanks, I caught your idea but no, IIS is not a cause, although the issue exists in Windows but not in Linux
Dmitry, following up on @Eduard Lebedyuk's comment, and even though you seem to say IIS is not the cause, this does "smell" like an IIS-related configuration.
I suggest you look here in the IIS docs, and in this related thread.
This setting enables to provide custom error pages instead of the "raw" downstream original server error (to be friendlier to users, or to possibly hide sensitive error details).
Try turning this setting off and see if this helps (if Apache is also available for example you can attempt testing with it as well to compare results).