Error Fetching Pinning Info
Thrown when fetching pinning information from the remote Configuration source fails.
This error occurs when TrustPin cannot download the pinning configuration from the TrustPin CDN or when the downloaded configuration cannot be parsed.
Common Causes
Network connectivity issues
DNS resolution failures for
cdn.trustpin.cloudFirewall or proxy blocking HTTPS requests
Service downtime or maintenance
Invalid response format from the server
Resolution Steps
Check connectivity: Verify internet connection and DNS resolution
Test endpoint: Try accessing
https://cdn.trustpin.clouddirectlyReview firewall: Ensure HTTPS traffic to TrustPin CDN is allowed
Retry with backoff: Implement exponential backoff for transient failures
Check service status: Verify TrustPin service availability
Retry Strategy
suspend fun setupWithRetry() {
repeat(3) { attempt ->
try {
trustPin.setup(/* credentials */)
return // Success
} catch (e: TrustPinError.ErrorFetchingPinningInfo) {
if (attempt < 2) {
delay((attempt + 1) * 1000L) // Exponential backoff
} else {
throw e
}
}
}
}Content copied to clipboard