backstage-showcase "not found" error handler doesn't work for plugin endpoints #1023
Open
Description
Describe the bug
backstage-showcase "not found" handler doesn't work for plugin endpoints
Expected Behavior
Request should fail with 404 error
What are the steps to reproduce this bug?
-
Execute backstage with enabled dynamic plugins.
-
Call endpoint url for plugin which actually doesn't exist:
curl http://localhost:7007/api/sonarqube/.well-known/backstage/permissions/metadata
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Janus Community Showcase"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><link rel="icon" href=""/><title>Janus IDP Backstage Showcase</title><script defer="defer" src="/static/runtime.a8aaf76e.js"></script><script defer="defer" src="/static/main.a8aaf76e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>Oleksandrs-MacBook-Pro:backstage oandriie$ curl http://localhost:7007/api/sonarqube/.well-known/backstage/permissions/metadata -v
* Trying [::1]:7007...
* Connected to localhost (::1) port 7007
> GET /api/sonarqube/.well-known/backstage/permissions/metadata HTTP/1.1
> Host: localhost:7007
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Security-Policy: default-src 'self';base-uri 'self';font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self' 'unsafe-eval';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests;connect-src 'self' http: https:
< Referrer-Policy: no-referrer
< Strict-Transport-Security: max-age=15552000; includeSubDomains
< X-Content-Type-Options: nosniff
< X-DNS-Prefetch-Control: off
< X-Download-Options: noopen
< X-Frame-Options: DENY
< X-Permitted-Cross-Domain-Policies: none
< X-XSS-Protection: 0
< cache-control: no-store, max-age=0
< Accept-Ranges: bytes
< Last-Modified: Mon, 13 Nov 2023 13:12:06 GMT
< ETag: W/"417-18bc8cf89b4"
< Content-Type: text/html; charset=UTF-8
< Content-Length: 1047
< Vary: Accept-Encoding
< Date: Tue, 27 Feb 2024 22:57:53 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
* Connection #0 to host localhost left intact
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Janus Community Showcase"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><link rel="icon" href=""/><title>Janus IDP Backstage Showcase</title><script defer="defer" src="/static/runtime.a8aaf76e.js"></script><script defer="defer" src="/static/main.a8aaf76e.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>