Written by

UKK Köln
Question Dmitrii Baranov · Jan 8, 2023

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

Comments

Eduard Lebedyuk · Jan 8, 2023

Are you setting Accept header in request to application/json?

0
Dmitrii Baranov  Jan 8, 2023 to Eduard Lebedyuk

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 HTML

<div id="content">
		<div class="content-container">
			<fieldset>
				<h2>500 - Internal server error.</h2>
				<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
			</fieldset>
		</div>
	</div>
0
Dmitrii Baranov  Jan 9, 2023 to Eduard Lebedyuk

Thanks, I caught your idea but no, IIS is not a cause, although the issue exists in Windows but not in Linux

0
Tani Frankel  Jan 10, 2023 to Dmitrii Baranov

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).

0