Skip to content

Commit

Permalink
fix: error message
Browse files Browse the repository at this point in the history
  • Loading branch information
peaklabs-dev committed Dec 23, 2024
1 parent 0a851ec commit 6dc8749
Showing 1 changed file with 7 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class UpdateEmailEncryptionValues extends Migration
{
/**
* The encryption mappings.
* Encryption mappings.
*/
private array $encryptionMappings = [
'tls' => 'starttls',
Expand All @@ -33,10 +33,7 @@ public function up(): void
]);
}
} catch (\Exception $e) {
\Log::error('Failed to update instance_settings encryption for ID: '.$setting->id, [
'error' => $e->getMessage(),
'old_value' => $setting->smtp_encryption,
]);
\Log::error('Failed to update instance settings: '.$e->getMessage());
}
}

Expand All @@ -51,19 +48,14 @@ public function up(): void
]);
}
} catch (\Exception $e) {
\Log::error('Failed to update email_notification_settings encryption for ID: '.$setting->id, [
'error' => $e->getMessage(),
'old_value' => $setting->smtp_encryption,
]);
\Log::error('Failed to update email settings: '.$e->getMessage());
}
}

DB::commit();
} catch (\Exception $e) {
DB::rollBack();
\Log::error('Failed to complete email encryption migration', [
'error' => $e->getMessage(),
]);
\Log::error('Failed to update email encryption: '.$e->getMessage());
throw $e;
}
}
Expand Down Expand Up @@ -93,10 +85,7 @@ public function down(): void
]);
}
} catch (\Exception $e) {
\Log::error('Failed to reverse instance_settings encryption for ID: '.$setting->id, [
'error' => $e->getMessage(),
'old_value' => $setting->smtp_encryption,
]);
\Log::error('Failed to reverse instance settings: '.$e->getMessage());
}
}

Expand All @@ -111,19 +100,14 @@ public function down(): void
]);
}
} catch (\Exception $e) {
\Log::error('Failed to reverse email_notification_settings encryption for ID: '.$setting->id, [
'error' => $e->getMessage(),
'old_value' => $setting->smtp_encryption,
]);
\Log::error('Failed to reverse email settings: '.$e->getMessage());
}
}

DB::commit();
} catch (\Exception $e) {
DB::rollBack();
\Log::error('Failed to complete email encryption rollback migration', [
'error' => $e->getMessage(),
]);
\Log::error('Failed to reverse email encryption: '.$e->getMessage());
throw $e;
}
}
Expand Down

0 comments on commit 6dc8749

Please sign in to comment.