You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current SDK returns all errors with ParseError which can not be used to determine the exact error details to show on the UI.
Steps to reproduce
Disconnect the internet on your device (Turn on Airplane Mode)
Try to call any CloudCode function
Actual Outcome
You will get this ParseError:
(lldb) po error
ParseError code=-1 error=Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}
- code : ParseSwift.ParseError.Code.unknownError
- message : "Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 \"The Internet connection appears to be offline.\" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 \"(null)\" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(\n \"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>\"\n), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}"
- otherCode : nil
You'll get these details:
(lldb) po error.domain
"ParseSwift.ParseError"
(lldb) po error.code
1
(lldb) po error.localizedDescription
"ParseError code=-1 error=Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 \"The Internet connection appears to be offline.\" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 \"(null)\" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(\n \"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>\"\n), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey= host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}"
We can not get the exact error domain NSURLErrorDomain, code -1009 with the message The Internet connection appears to be offline to display it on the UI correctly, but only ParseSwift.ParseErrorcode 1 all the time.
Expected Outcome
We need an originalError variable in ParseError so we can check what was the exact error that caused the problem, not just ParseSwift.ParseError code 1
Environment
Client
Parse Swift SDK version: 4.14.2
Xcode version: 14.2
Operating system (iOS, macOS, watchOS, etc.): iOS 16.3
Operating system version: MacOS
Server
Parse Server version: 4.5.0
Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS
Database
System (MongoDB or Postgres): MongoDB
Database version: 3.6
Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): AWS
Logs
(lldb) po error
ParseError code=-1 error=Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}
- code : ParseSwift.ParseError.Code.unknownError
- message : "Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 \"The Internet connection appears to be offline.\" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 \"(null)\" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(\n \"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>\"\n), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}"
- otherCode : nil
(lldb) po error.domain
"ParseSwift.ParseError"
(lldb) po error.code
1
(lldb) po error.localizedDescription
"ParseError code=-1 error=Unable to connect with parse-server: Error Domain=NSURLErrorDomain Code=-1009 \"The Internet connection appears to be offline.\" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x282733570 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 \"(null)\" UserInfo={_NSURLErrorNWPathKey=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(\n \"LocalDataTask <27703A59-4B71-4320-B775-0560BC43DFDB>.<6>\"\n), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey= host/functions/FunctionName, NSErrorFailingURLKey=https://host/functions/FunctionName, _kCFStreamErrorDomainKey=1}"
The text was updated successfully, but these errors were encountered:
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
The current SDK returns all errors with ParseError which can not be used to determine the exact error details to show on the UI.
Steps to reproduce
Actual Outcome
You will get this ParseError:
You'll get these details:
We can not get the exact error domain
NSURLErrorDomain
, code-1009
with the messageThe Internet connection appears to be offline
to display it on the UI correctly, but onlyParseSwift.ParseError
code 1
all the time.Expected Outcome
We need an
originalError
variable inParseError
so we can check what was the exact error that caused the problem, not justParseSwift.ParseError code 1
Environment
Client
4.14.2
14.2
iOS 16.3
MacOS
Server
4.5.0
AWS
Database
MongoDB
3.6
AWS
Logs
The text was updated successfully, but these errors were encountered: