Skip to content

Commit

Permalink
fix: startup errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Apr 16, 2024
1 parent ce32c5b commit 5c7e645
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ public static void loadForAllTenants(Main main, List<AppIdentifier> apps, List<T
RESOURCE_KEY,
new AccessTokenSigningKey(app, main));
} catch (TenantOrAppNotFoundException e) {
throw new IllegalStateException(e);
if (app.getAsPublicTenantIdentifier().equals(TenantIdentifier.BASE_TENANT)) {
throw new IllegalStateException(e);
}
// ignore otherwise
Logging.warn(main, app.getAsPublicTenantIdentifier(), "Could not load AccessTokenSigningKey: " +
e.getMessage());
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/io/supertokens/signingkeys/JWTSigningKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.supertokens.ResourceDistributor;
import io.supertokens.exceptions.QuitProgramException;
import io.supertokens.jwt.exceptions.UnsupportedJWTSigningAlgorithmException;
import io.supertokens.output.Logging;
import io.supertokens.pluginInterface.STORAGE_TYPE;
import io.supertokens.pluginInterface.exceptions.StorageQueryException;
import io.supertokens.pluginInterface.exceptions.StorageTransactionLogicException;
Expand Down Expand Up @@ -85,7 +86,12 @@ public static void loadForAllTenants(Main main, List<AppIdentifier> apps, List<T
jwtSigningKey.generateKeysForSupportedAlgos(main);

} catch (TenantOrAppNotFoundException e) {
throw new IllegalStateException(e);
if (app.getAsPublicTenantIdentifier().equals(TenantIdentifier.BASE_TENANT)) {
throw new IllegalStateException(e);
}
// ignore otherwise
Logging.warn(main, app.getAsPublicTenantIdentifier(), "Could not load JWTSigningKey: " +
e.getMessage());
}
}
}
Expand Down

0 comments on commit 5c7e645

Please sign in to comment.