Fixing call getter (#378)

This commit is contained in:
Denis Makogon
2017-10-01 19:56:27 +03:00
committed by GitHub
parent 441f7a3f6c
commit 21bbc996fb

View File

@@ -489,6 +489,9 @@ func (ds *sqlStore) GetCall(ctx context.Context, appName, callID string) (*model
var call models.Call var call models.Call
err := row.StructScan(&call) err := row.StructScan(&call)
if err != nil { if err != nil {
if err == sql.ErrNoRows {
return nil, models.ErrCallNotFound
}
return nil, err return nil, err
} }
return &call, nil return &call, nil