Skip to content

Commit

Permalink
fix: handling app/tenant not found
Browse files Browse the repository at this point in the history
  • Loading branch information
tamassoltesz committed Dec 5, 2024
1 parent 05edffc commit 12768c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/supertokens/storage/postgresql/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,10 @@ public void signUpMultipleViaBulkImport_Transaction(TransactionConnection connec
|| isPrimaryKeyError(serverMessage, config.getAppIdToUserIdTable())) {
errorByPosition.put(users.get(position).userId,
new io.supertokens.pluginInterface.thirdparty.exception.DuplicateUserIdException());
} else if (isForeignKeyConstraintError(serverMessage, config.getAppIdToUserIdTable(), "app_id")) {
errorByPosition.put(users.get(position).userId, new TenantOrAppNotFoundException(users.get(position).tenantIdentifier.toAppIdentifier()));
} else if (isForeignKeyConstraintError(serverMessage, config.getUsersTable(), "tenant_id")) {
errorByPosition.put(users.get(position).userId,new TenantOrAppNotFoundException(users.get(position).tenantIdentifier));
}

}
Expand Down

0 comments on commit 12768c9

Please sign in to comment.