  =head2 _soap_to_koha_patron
 
  Convert a SOAP object of type "Laaner" into a hash that can be sent to AddMember or ModMember.
-@@ -635,13 +745,13 @@ sub _koha_patron_to_soap {
+@@ -635,13 +750,13 @@ sub _koha_patron_to_soap {
              SOAP::Data->name( 'fnr_hash'    => $patron_attributes->{ 'fnr' } )->type( 'string' )->type( 'string' ),
              SOAP::Data->name( 'navn'        => $patron->surname . ', ' . $patron->firstname    )->type( 'string' ),
              SOAP::Data->name( 'sist_endret' => $sync->lastsync      )->type( 'string' ),

+        chomp($now);
+        $sync->update( { 'lastsync' => $now } );
+        return ($response, 0);
+    }
+
+    if ($cause =~ /SIST_ENDRET/) {
+        # NL has different timestamp; returnin an error like this:
+        #  endre: Uoverensstemmelse med gjeldende data i basen:

+    # Handle error special cases
+    my $cause = $response->result->{'melding'};
+    return ($response, 1) unless $cause;
+
+    if ($cause =~ /lnr finnes allerede i registeret/) {
+        # Because of staff mistakes, patrons are sometimes registered with existing cardnumber
