diff --git a/modules/backend/handlers/users.go b/modules/backend/handlers/users.go index eecd82f..c0f0f55 100644 --- a/modules/backend/handlers/users.go +++ b/modules/backend/handlers/users.go @@ -386,6 +386,9 @@ func (s Server) AddUserTitle(ctx context.Context, request oapi.AddUserTitleReque // fmt.Println(pgErr.Code) // => 42601 if pgErr.Code == pgErrDuplicateKey { //duplicate key value return oapi.AddUserTitle409Response{}, nil + } else { + log.Errorf("%v", err) + return oapi.AddUserTitle500Response{}, nil } } else { log.Errorf("%v", err) diff --git a/sql/migrations/000001_init.up.sql b/sql/migrations/000001_init.up.sql index 415b9af..57aa238 100644 --- a/sql/migrations/000001_init.up.sql +++ b/sql/migrations/000001_init.up.sql @@ -86,7 +86,6 @@ CREATE TABLE usertitles ( status usertitle_status_t NOT NULL, rate int CHECK (rate > 0 AND rate <= 10), review_id bigint REFERENCES reviews (id) ON DELETE SET NULL, - ctime timestamptz NOT NULL DEFAULT now(), ftime timestamptz NOT NULL DEFAULT now() -- // TODO: series status );