From ce3f2cde6ddfce5f80ff2c12092ed4ead50078f3 Mon Sep 17 00:00:00 2001 From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> Date: Mon, 21 Nov 2022 12:19:02 +0200 Subject: [PATCH] Fix SQLITE_CONSTRAINT_NOTNULL when request uri is null --- .../database/transactions/events/StoreRequestTransaction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/StoreRequestTransaction.java b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/StoreRequestTransaction.java index 63dc7516f..0f042d110 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/StoreRequestTransaction.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/StoreRequestTransaction.java @@ -61,6 +61,9 @@ public class StoreRequestTransaction extends Transaction { private String getTruncatedURI() { String uri = request != null ? request.getPath().asString() + request.getQuery().asString() : internalRequest.getRequestedURIString(); + if (uri == null) { + uri = "non-HTTP request, missing URI"; + } return StringUtils.truncate(uri, 65000); } }