Skip to content
Snippets Groups Projects

fix exception when logging IP addresses

Merged Hazelnoot requested to merge fEmber/Sharkey:hazelnoot/fix-null-IP into develop

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

Merge request pipeline #1274 failed

Merge request pipeline failed for 3defed6a

Merged by dakkardakkar 4 months ago (Oct 2, 2024 5:59pm UTC)

Loading

Pipeline #1281 passed

Pipeline passed for a357e9bc on develop

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading