Merge branch 'error-handling' into rt-domains

This commit is contained in:
adlerhurst
2025-07-17 09:38:51 +02:00
12 changed files with 352 additions and 92 deletions

View File

@@ -244,12 +244,6 @@ func scanOrganizations(ctx context.Context, querier database.Querier, builder *d
organizations := []*domain.Organization{}
if err := rows.(database.CollectableRows).Collect(&organizations); err != nil {
// if no results returned, this is not a error
// it just means the organization was not found
// the caller should check if the returned organization is nil
if err.Error() == "no rows in result set" {
return nil, nil
}
return nil, err
}
return organizations, nil