snyk-tech-services / backstage-plugin-snyk

Other
25 stars 26 forks source link

[πŸ›] Error occurred while proxying request #61

Closed ghost closed 3 years ago

ghost commented 3 years ago

Expected behaviour

The proxying of requests work in the backend, and Snyk card is shown to the user.

Actual behaviour

The proxying of requests doesn't work in the backend.

My config is as follows:

proxy:
  '/snyk':
    target: https://snyk.io/api/v1
    headers:
      User-Agent: tech-services/backstage-plugin/1.0
      Authorization:
        $include: ${SECRET_TOKENS}#SNYK_TOKEN

I also tried the workaround listed here: https://github.com/snyk-tech-services/backstage-plugin-snyk/issues/11 but still the same.

I tried enabling debug logs (LOG_LEVEL=debug) but I don't see anything more than that. I have no idea what's going on between the backend and Snyk's API.

I can curl the Snyk API (https://snyk.io/api/v1/org/<my-org>/projects) fine with my token.

Steps to reproduce

Please share minimal steps needed to reproduce your issue. Ideally a paired down manifest / project to showcase the problem that can also be used for testing.

Debug log

2021-11-15T06:37:13.168Z proxy error [HPM] Error occurred while proxying request <backstage-url>/api/proxy/snyk/org/<myorg>/projects to https://snyk.io/api/v1 [ECONNRESET] (https://nodejs.org/api/errors.html#errors_common_system_errors) type=plugin

Screenshots

If applicable, add screenshots to help explain your problem.

ghost commented 3 years ago

My bad, there was a missing Aviatrix route on our end :(