GithubHelp home page GithubHelp logo

Uncaught (in promise) Error: Failed to fetch the conformance statement from "https://staging-fhir.ecwcloud.com/fhir/r4/FFBJCD/metadata". TypeError: Network request failed about client-js HOT 7 OPEN

msohaib308 avatar msohaib308 commented on September 28, 2024
Uncaught (in promise) Error: Failed to fetch the conformance statement from "https://staging-fhir.ecwcloud.com/fhir/r4/FFBJCD/metadata". TypeError: Network request failed

from client-js.

Comments (7)

vlad-ignatov avatar vlad-ignatov commented on September 28, 2024 1

If you try loading those URLs in a browser window you will get back XML. That is because browsers send some accept headers by default. Otherwise you would get JSON, even if you don't send any accept header. Don't let that trick you into thinking that XML is the issue - in this case what you see is not what you get :)

Every FHIR server MUST support CORS. Otherwise it would be unusable (even if you didn't need to authenticate). You can't work around this from the client side and that is exactly the point of CORS - clients should be rejected unless server admins say they shouldn't.

Your only choice is to let them know that CORS must be enabled and perhaps send them that screenshot for reference.

from client-js.

vlad-ignatov avatar vlad-ignatov commented on September 28, 2024

The client does NOT support XML but it sends and accept: application/json header on each request to tell the server how to respond. This seems to work fine with your server.

As the screenshot shows, the problem is not there. You just need to configure / modify your FHIR server to support CORS.

from client-js.

msohaib308 avatar msohaib308 commented on September 28, 2024

Issue is the XML response type

Anyway if i can handle on client side
Because FHIR server is owned by third party

from client-js.

zamananjum0 avatar zamananjum0 commented on September 28, 2024

Is this resolve?
@msohaib308 Can you please guide me on this?

from client-js.

msohaib308 avatar msohaib308 commented on September 28, 2024

Hy @zamananjum0

Issue is not resolved yet
however they suggested to try implementation on backend side
Below is the email that i got from ECW Team

image

from client-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.