Skip to content

Commit

Permalink
Removed print statement for API response logging to streamline error …
Browse files Browse the repository at this point in the history
…management.
  • Loading branch information
vamsii777 committed Dec 21, 2024
1 parent 4e9a3db commit 4c9f197
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/Razorpay/Utils/APIRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ internal enum APIRequestHandler {
) async throws -> T where T: RazorpayResponse {
do {
let response = try await operation()
print("📦 Razorpay API Response:", response)

// If response is an error response, throw it directly
if let errorDict = response["error"] as? [String: Any] {
Expand All @@ -34,15 +33,15 @@ internal enum APIRequestHandler {
field: field,
metadata: metadata
)

throw RazorpayError.apiError(error)
}

return try T(response: response)
} catch let error as RazorpayError {
throw error
} catch {
throw RazorpayError.invalidResponse(error)
throw RazorpayError.invalidResponse(error.localizedDescription)
}
}

Expand Down

0 comments on commit 4c9f197

Please sign in to comment.