brianpos / UploadFIG

Demonstration commandline project to upload a FHIR implementation guide to a FHIR server
BSD 3-Clause "New" or "Revised" License
11 stars 0 forks source link

Value supplied for Accept header is not supported. #1

Closed TerriblyVexed closed 1 year ago

TerriblyVexed commented 1 year ago

I'm getting this error on every file in the IG. Do I need to disable authentication to use this tool? I'm trying to use this on Azure API for Fhir.

brianpos commented 1 year ago

Sorry this has taken so long to get back to. Now that it's switched over to a commandline tool that you don't need to build (dotnet tool install etc) And there is a parameter you can use to provide the destination server headers. --destinationServerHeaders or -dh "Authentication: Bearer xxxxxxxxxxx"

Edit: "Authorization: Bearer ..." (as noted below, thanks enjoysparkling)

enjoysparkling commented 1 year ago

@brianpos - We are having the same issue. This is the first time we have tried using the tool.

Server: Azure Health Data Services FHIR service FHIR version: R4

I want to test to make sure I have the us.core 6.0.0 properly loaded on the server (previously loaded with the microsoft-fhir-cli tool): Command: UploadFIG -pid hl7.fhir.us.core -pv 6.0.0 -c -d https://<my_server>.fhir.azurehealthcareapis.com -dh "Authorization: Bearer xxxxx" --verbose

Error, I get this for every resource:

[...]
Warning: CodeSystem/us-core-provenance-participant-type Operation was unsuccessful because of a client error (NotAcceptable). OperationOutcome: Overall result: FAILURE (1 errors and 0 warnings)
[ERROR] (no details)(further diagnostics: Value supplied for the "Accept" header is not supported.)
[...]

Attempted resolutions:

Screenshot (working Postman request header): image

brianpos commented 1 year ago

The message is on the accept header, not the authorization header. Maybe try the -df json parameter?

enjoysparkling commented 1 year ago

Thank you, that did the trick! It did require -dh "Authorization: Bearer xxx" (not Authentication). But I did not have to do the az login.

So, to get this to work on Azure FHIR service, I ran:

UploadFIG -pid hl7.fhir.us.core -pv 6.0.0 -c -d https://<my_server>.fhir.azurehealthcareapis.com -df json -dh "Authorization:Bearer xxxx" --verbose