Fix unclear error when clubs db uri is missing or empty
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in configs/setup.go around line 130 and trace the CLUBS_DB_URI loading and Clubs database connection path. Compare the missing and empty URI cases, including db.PingContext(ctx), and verify that errors identify the Clubs Database, include the ping error where applicable, and avoid an unnecessary stack trace.
Written by the indexing model from the issue text.
Description
when clubs db uri is empty, the user
When missing:
panic: Error loading 'CLUBS_DB_URI' from the .env file
This is a good error, and makes it clear whats wrong, but it prints a stack trace, which isn't necessary for this error, use log.Fatal instead of log.Panic to remove the stack trace
When Empty:
2026/04/09 20:39:37 Connected to MongoDB
20:39:37 .../configs/setup.go:130: Unable to ping database
Seeing this error, it almost looks as go-api is unable to ping MongoDB since that's what comes right before. Instead it's because of an empty/wrong CLUBS_DB_URI, and it wasn't able to ping the Clubs Database. Make it clearer that the issue is with connecting to the Clubs Database, and print the specific error that comes from db.PingContext(ctx) with the error message.
- Dominant language
- Go
- Stars
- 39
- Forks
- 94
- Avg merge
- 10h 43m
- Merged PRs (30d)
- 5
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.
More from UTDNebula/nebula-api
-
L1 recommended for recruits
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
UTDNebula/nebula-api#430 · 1 comment ·
-
L1 recommended for recruits
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
UTDNebula/nebula-api#428 · 1 comment · 1 assignee ·
-
L1 recommended for recruits
Difficulty 1/5 Under an hour Newbie friendliness 90/100
UTDNebula/nebula-api#427 · 1 comment · 1 assignee ·
-
L1
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
UTDNebula/nebula-api#421 · 1 comment · 1 reaction ·
-
L1
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UTDNebula/nebula-api#415 ·
All issues in UTDNebula/nebula-api
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100