fix exception when logging IP addresses
What does this PR do?
This PR prevents a rare exception that is thrown when a client's IP address is null.
This error:
ERR * [db sql] INSERT INTO "user_ip" AS "MiUserIp"("createdAt", "userId", "ip") VALUES ($1, $2, DEFAULT) ON CONFLICT DO NOTHING RETURNING "id"
QueryFailedError: null value in column "ip" of relation "user_ip" violates not-null constraint at PostgresQueryRunner.query
Will now appear as a warning:
WARN * user <user id> has a null IP address; please check your network configuration.
Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines
-
I agree to follow this project's Contribution Guidelines -
I have made sure to test this pull request
Merge request reports
Activity
Filter activity
Please register or sign in to reply