snyk-tech-services/backstage-plugin-snyk

[๐Ÿ›] 404 response from Snyk API (solution)

JacobValdemar opened this issue ยท 8 comments

Expected behaviour

Plugin works.

Actual behaviour

Plugin is recieving 404 responses from snyk

Steps to reproduce

Follow guide

Solution

My solution to this problem was to change the proxy to something like:

'/snyk':
    target: https://snyk.io/api/v1
    headers:
      User-Agent: tech-services/backstage-plugin/1.0
      Authorization:
        $env: SNYK_TOKEN
    pathRewrite:
      '^/proxy/snyk/': '/'

Maybe add this to the installation guide, that if you get 404 from the API you can try with some path rewrite :)

Hum... I'll try and reproduce on my side. Thanks for reporting this !

Will try to reproduce with a completely clean install, but in the meantime updated the README.

I'm facing Error 404 - Failed fetching Projects list snyk data - even with the pathrewrite in my repository's catalog-info.yaml. Would you please help check

dollopofsunshine did you ever get back an answer on your issue or find resolution? I am having the same problem it appears my annotations are correct, and I have other projects that work but mine does not so my token should be fine. thx

dollopofsunshine did you ever get back an answer on your issue or find resolution? I am having the same problem it appears my annotations are correct, and I have other projects that work but mine does not so my token should be fine. thx

Were you able to fix this? I am still getting the same error also despite the path change

I am getting the same error. Tried with the pathRewrite and different urls for the target but it won't work. Does anyone has any ideas on how to fix it?

I'm also having the same issue, getting 404!

Same here, I have the same error.