diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/covidcertificate/test/core/server/TestCertificateServer.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/covidcertificate/test/core/server/TestCertificateServer.kt
index 436df40c33e88285bdccd5d3a7ab8cc9aa12a784..019bf6ba42ddbe8d727d8c27b43881b2f17b7769 100644
--- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/covidcertificate/test/core/server/TestCertificateServer.kt
+++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/covidcertificate/test/core/server/TestCertificateServer.kt
@@ -68,7 +68,10 @@ class TestCertificateServer @Inject constructor(
             }
         } catch (e: Exception) {
             Timber.tag(TAG).w(e, "registerPublicKeyForTest failed")
-            throw TestCertificateServerException(PKR_FAILED)
+            throw when (e) {
+                is TestCertificateServerException -> e
+                else -> TestCertificateServerException(PKR_FAILED)
+            }
         }
     }