Collection-index refresh returns HTTP 500 because the service method is missing
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
Start with app/controllers/collection-indexes-controller.js around line 120, then read app/services/stix/collection-indexes-service.js and its base classes to trace the missing refresh entry point. Add regression coverage for newer and unchanged remote content, unknown IDs, missing URLs, and remote failures; done means POST /api/collection-indexes/{id}/refresh no longer returns this TypeError and updates the database only when appropriate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
POST /api/collection-indexes/{id}/refresh calls collectionIndexService.refresh(id), but neither CollectionIndexesService nor its base classes implement refresh. The endpoint returns HTTP 500 before looking up the index or fetching its remote URL.
Observed on REST API 4.24.0, commit 69b37fe769e6abe7675d413451a8361aecc36bea.
Reproduction
- Authenticate with an editor or administrator session.
- Create a collection index.
- Send
POST /api/collection-indexes/{id}/refresh.
Server logs:
[ERROR] Failed with error: TypeError: collectionIndexService.refresh is not a function
[HTTP] POST /api/collection-indexes/bc94bee0-f775-47cb-b93a-cb6171ba58a5/refresh 500
The controller catches the exception; the API continued serving requests afterward.
Expected behavior
Retrieve the index from workspace.remote_url and update the database when the remote index is newer. Handle unknown IDs, missing URLs, and remote failures explicitly.
Relevant implementation
Implement single-index refresh and add regression coverage for newer/unchanged remote content and error cases.
- Lingua principale
- JavaScript
- Stelle
- 56
- Fork
- 18
- Merge medio
- 19h 39m
- PR unite (30g)
- 7
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mitre-attack/attack-workbench-rest-api
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Add ADM validation bypass for server-controlled fields on non-compliant objectsForse già presa @seansica l’ha presa 21 giorni fa. Aperta
mitre-attack/attack-workbench-rest-api#517 · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
mitre-attack/attack-workbench-rest-api#512 · 1 commento ·
Tutte le issue di mitre-attack/attack-workbench-rest-api
Issue simili
-
ai-driven-fuzzing bug Cosmetic
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
linagora/cozy-client#1831 ·
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-fuzzing bug Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
[ordering-review] workshop order graph: 1 confirmed ordering problem, 3 cycles are false positivesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
githubnext/gh-aw-workshop#5331 ·
I maintainer di solito rispondono entro 1 giorno
-
Remove: 21 SexturyApertachannels:remove check:passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno