Skip to content
Snippets Groups Projects
Commit e58f6f86 authored by Jonah Husson's avatar Jonah Husson
Browse files

return proper error when no records found my getlatestephemeral

parent 84f1ed04
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ func (impl *DatabaseImpl) GetLatestEphemeral() (*Ephemeral, error) {
return nil, err
}
if len(result) < 1 {
return nil, errors.New("No ephemerals found in database")
return nil, gorm.ErrRecordNotFound
}
return result[0], nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment