mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix error handling
This commit is contained in:
@@ -229,10 +229,11 @@ func (ds *sqlStore) RemoveApp(ctx context.Context, appName string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if _, err := res.RowsAffected(); err != nil {
|
_, err = res.RowsAffected()
|
||||||
|
if err == sql.ErrNoRows {
|
||||||
return models.ErrAppsNotFound
|
return models.ErrAppsNotFound
|
||||||
}
|
}
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ds *sqlStore) GetApp(ctx context.Context, name string) (*models.App, error) {
|
func (ds *sqlStore) GetApp(ctx context.Context, name string) (*models.App, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user