Skip to content

Commit a46ab67

Browse files
committed
Adding underlying instead of unknown error
1 parent aaf9032 commit a46ab67

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog Cobalt
22

3+
## v5.9.4 (20-06-2019)
4+
- Adding underlying error instead of unknown error
5+
36
## v5.9.3 (19-06-2019)
47
- Bugfix manual auth provider
58

Cobalt.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Cobalt"
3-
s.version = "5.9.3"
3+
s.version = "5.9.4"
44
s.author = { "Bas van Kuijck" => "[email protected]" }
55
s.license = { :type => "MIT", :file => "LICENSE" }
66
s.homepage = "http://www.e-sites.nl"

Sources/Core/Base/Error.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class Error: Swift.Error {
7171
init(from error: Swift.Error, json: JSON? = nil) {
7272
if error is Error {
7373
_clone(from: error as! Error)
74-
74+
return
7575
} else if let json = json, json != .null {
7676
switch json["error"].stringValue {
7777
case "invalid_grant":
@@ -85,11 +85,9 @@ public class Error: Swift.Error {
8585
default:
8686
break
8787
}
88-
_clone(from: Error.unknown(json))
89-
90-
} else {
91-
_clone(from: Error.underlying(error))
9288
}
89+
90+
_clone(from: Error.underlying(error))
9391
}
9492

9593
private func _clone(from error: Error) {

0 commit comments

Comments
 (0)