Skip to content

Commit d3945c7

Browse files
committed
Make WordPressApiError conform to LocalizedError so it shows in alerts
1 parent b888cdf commit d3945c7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Networking/Networking/Model/WordPressApiError.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,11 @@ extension WordPressApiError: CustomStringConvertible {
7070
}
7171
}
7272
}
73+
74+
// MARK: - LocalizedError Conformance
75+
//
76+
extension WordPressApiError: LocalizedError {
77+
public var errorDescription: String? {
78+
description
79+
}
80+
}

0 commit comments

Comments
 (0)