K-Phoen / backstage-plugin-announcements

Announcements plugin for Backstage
MIT License
52 stars 30 forks source link

Announcement collator failing #177

Closed Apeksh742 closed 10 months ago

Apeksh742 commented 1 year ago

Collating documents for announcements failed: ResponseError: Request failed with 404 Error type=plugin documentType=announcements

Stacktrace:

at async AnnouncementsClient.announcements (node_modules/@k-phoen/backstage-plugin-announcements-backend/dist/index.cjs.js:151:12)
[1]     at async AnnouncementCollatorFactory.execute (node_modules/@k-phoen/backstage-plugin-announcements-backend/dist/index.cjs.js:171:21)

Package versions "@k-phoen/backstage-plugin-announcements": "^0.1.0", "@k-phoen/backstage-plugin-announcements-backend": "^0.2.0",

Shocktrooper commented 1 year ago

I too have received this error after updating backstage to 1.16.0

hmoraes commented 1 year ago

I also had the same problem. I checked that the Collator code is not using the correct endpoint to query the data and the expected return is also wrong.

I opened a PR with the fix

Bastian82 commented 1 year ago

I can confirm this error.

backstage info ::ffff:127.0.0.1 - - [03/Aug/2023:11:04:23 +0000] "GET /api/announcements/ HTTP/1.1" 404 - "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" type=incomingRequest
[1] 2023-08-03T11:04:23.901Z search error Collating documents for announcements failed: ResponseError: Request failed with 404 Error type=plugin documentType=announcements
[1] 2023-08-03T11:04:23.901Z search warn Index for announcements was not created: an error was encountered type=plugin documentType=announcements
[1] 2023-08-03T11:04:23.901Z backstage error Request failed with 404 Error type=taskManager task=search_index_announcements response=[object Response] body=[object Object] cause=Error: Request failed with status 404 Not Found name=ResponseError stack=ResponseError: Request failed with 404 Error