Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nakama migrate errors #1258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

toqueteos
Copy link
Contributor

@toqueteos toqueteos commented Aug 1, 2024

Fixes #1096

Changes

  • Simplified some one liners
  • Made error checking a bit more strict by always using pgerrcode constants
  • Unified database ping

Downsides

Unfortunately I had to split the ping context with timeout from the database version check one, this means there's now two timeouts:

  • 10s timeout for database ping
  • 5s timeout for database version

db.Close()
logger.Fatal("Failed to check if db exists", zap.String("db", dbName), zap.Error(err))
}
nakamaDBExists = false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be removed as the logger.Fatal will terminate the execution anyways

@toqueteos toqueteos force-pushed the improve-nakama-migrate-errors branch from a128078 to 6d3cbb4 Compare August 9, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading error message when running ./nakama migrate up
1 participant