Skip to content

Commit

Permalink
Added one more error check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-cohere committed Jan 21, 2025
1 parent 1b4145f commit bda781b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions databases/kbase/user_federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ func readUserTable() (map[string]string, error) {
usersForOrcids := make(map[string]string)
reader := csv.NewReader(file)
records, err := reader.ReadAll()
if err != nil {
return nil, InvalidKBaseUserSpreadsheet{
File: kbaseUserTableFile,
Message: "Couldn't parse CVS file",
}
}
for _, record := range records {
if len(record) != 2 {
return nil, InvalidKBaseUserSpreadsheet{
Expand Down

0 comments on commit bda781b

Please sign in to comment.