apply feedback 2

This commit is contained in:
aliamerj
2025-08-28 00:19:53 +03:00
parent 9043938233
commit 6c0a46dfd5
6 changed files with 83 additions and 207 deletions

View File

@@ -157,7 +157,7 @@ func (s *SqlStore) GetPeerJobByID(ctx context.Context, accountID, jobID string)
Where(accountAndIDQueryCondition, accountID, jobID).
First(&job).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, fmt.Errorf("job %s not found", jobID)
return nil, status.Errorf(status.NotFound, "job %s not found", jobID)
}
return &job, err
}