Skip to content

Commit

Permalink
fix(iOS): reject call on server error (#6024)
Browse files Browse the repository at this point in the history
  • Loading branch information
archibald-picq committed Oct 27, 2022
1 parent 0b8db38 commit 99cc86e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/Capacitor/Capacitor/Plugins/HttpRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ class HttpRequestHandler {
let task = urlSession.dataTask(with: urlRequest) { (data, response, error) in
urlSession.invalidateAndCancel()
if error != nil {
CAPLog.print("Error on request", String(describing: data), String(describing: response), String(describing: error))
call.reject(error!.localizedDescription, "REQUEST", error, [:])
return
}

Expand Down

0 comments on commit 99cc86e

Please sign in to comment.