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

Loading
Loading

Activity

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