mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
error message consistency
This commit is contained in:
parent
9c6e5ff76e
commit
d7e6b7891d
1 changed files with 3 additions and 6 deletions
9
main.go
9
main.go
|
|
@ -43,20 +43,17 @@ func run(c context.Context, getEnv func(string) string) error {
|
|||
TracesSampleRate: 1.0,
|
||||
ProfilesSampleRate: 1.0,
|
||||
}); err != nil {
|
||||
return fmt.Errorf("error initializing sentry %w", err)
|
||||
return fmt.Errorf("error initializing sentry: %w", err)
|
||||
}
|
||||
|
||||
// init database
|
||||
db, err := database.New(getEnv("DATABASE_URL"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error connecting to the database %w", err)
|
||||
return fmt.Errorf("error connecting to the database: %w", err)
|
||||
}
|
||||
|
||||
if err = database.Migrate(db, &booking.Booking{}, &booking.BookingRequest{}, &booking.Item{}); err != nil {
|
||||
return fmt.Errorf("error connecting to the database %w", err)
|
||||
return fmt.Errorf("error migrating the database: %w", err)
|
||||
}
|
||||
|
||||
// build calendar client
|
||||
gc, err := calendar.NewGoogleClient(ctx, getEnv("CALENDAR_CREDENTIALS"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("error building calendar client %w", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue