stac-utils / stac-utils/stac-server
Better log message needed when updating an existing collection record
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Updating a collection record via ingest currently produces an error log message that seems to indicate that something went wrong. That message is like {"level":"error","message":"$COLLECTION already exists."}. I believe to most people this message would indicate that the update failed, but that is not the case.
The message is emitted here. It indicates that the index for a given collection already exists and thus there is no attempt to create it. I do not believe this case to be an error, but more informational or perhaps even debug-level. I also think the message is problematically vague, and should be explicit like "index for collection {} already exists, skipping creation".
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at line 93 of src/lib/database-client.js, where the existing-collection message is emitted, and review how the index-exists case is handled during ingest. Done means the case is logged at an informational or debug level with wording that clearly says the collection index already exists and creation is skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100