Skip to content

Commit 819b702

Browse files
author
Rishabh
committed
adds debug info to help fix supertokens/supertokens-core#373
1 parent 68db598 commit 819b702

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9-
### Changes
9+
10+
## [1.13.2] - 2022-02-19
1011

1112
- Refactor Query Mechanism to avoid Memory Leaks
13+
- Adds debug statement to help fix error of passwordless code creation procedure (related to https://github.
14+
com/supertokens/supertokens-core/issues/373).
1215

1316
## [1.13.1] - 2022-02-16
1417

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id 'java-library'
33
}
44

5-
version = "1.13.1"
5+
version = "1.13.2"
66

77
repositories {
88
mavenCentral()

src/main/java/io/supertokens/storage/postgresql/Start.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141
import io.supertokens.pluginInterface.jwt.sqlstorage.JWTRecipeSQLStorage;
4242
import io.supertokens.pluginInterface.passwordless.PasswordlessCode;
4343
import io.supertokens.pluginInterface.passwordless.PasswordlessDevice;
44-
import io.supertokens.pluginInterface.passwordless.exception.DuplicateCodeIdException;
45-
import io.supertokens.pluginInterface.passwordless.exception.DuplicateDeviceIdHashException;
46-
import io.supertokens.pluginInterface.passwordless.exception.DuplicateLinkCodeHashException;
47-
import io.supertokens.pluginInterface.passwordless.exception.DuplicatePhoneNumberException;
48-
import io.supertokens.pluginInterface.passwordless.exception.UnknownDeviceIdHash;
44+
import io.supertokens.pluginInterface.passwordless.exception.*;
4945
import io.supertokens.pluginInterface.passwordless.sqlStorage.PasswordlessSQLStorage;
5046
import io.supertokens.pluginInterface.session.SessionInfo;
5147
import io.supertokens.pluginInterface.session.sqlStorage.SessionSQLStorage;
@@ -55,13 +51,7 @@
5551
import io.supertokens.storage.postgresql.config.Config;
5652
import io.supertokens.storage.postgresql.config.PostgreSQLConfig;
5753
import io.supertokens.storage.postgresql.output.Logging;
58-
import io.supertokens.storage.postgresql.queries.EmailPasswordQueries;
59-
import io.supertokens.storage.postgresql.queries.EmailVerificationQueries;
60-
import io.supertokens.storage.postgresql.queries.GeneralQueries;
61-
import io.supertokens.storage.postgresql.queries.JWTSigningQueries;
62-
import io.supertokens.storage.postgresql.queries.PasswordlessQueries;
63-
import io.supertokens.storage.postgresql.queries.SessionQueries;
64-
import io.supertokens.storage.postgresql.queries.ThirdPartyQueries;
54+
import io.supertokens.storage.postgresql.queries.*;
6555
import org.jetbrains.annotations.NotNull;
6656
import org.jetbrains.annotations.Nullable;
6757
import org.jetbrains.annotations.TestOnly;
@@ -215,6 +205,12 @@ public <T> T startTransaction(TransactionLogic<T> logic)
215205
if (e instanceof StorageQueryException) {
216206
throw (StorageQueryException) e;
217207
} else if (e instanceof StorageTransactionLogicException) {
208+
Logging.debug(this,
209+
"Number of retries: " + tries + ". Actual exception message: " + actualException);
210+
if (psqlException != null) {
211+
Logging.debug(this,
212+
"PSQL error status code: " + psqlException.getServerErrorMessage().getSQLState());
213+
}
218214
throw (StorageTransactionLogicException) e;
219215
}
220216
throw new StorageQueryException(e);

0 commit comments

Comments
 (0)