Skip to content

Commit b0eafde

Browse files
committed
remove more code
1 parent e746c0d commit b0eafde

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

Sources/ParseSwift/Types/ParseSchema.swift

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -265,24 +265,13 @@ extension ParseSchema {
265265
var options = options
266266
options.insert(.useMasterKey)
267267
options.insert(.cachePolicy(.reloadIgnoringLocalCacheData))
268-
do {
269-
try fetchCommand()
270-
.executeAsync(options: options,
271-
callbackQueue: callbackQueue,
272-
completion: completion)
273-
} catch {
274-
callbackQueue.async {
275-
if let error = error as? ParseError {
276-
completion(.failure(error))
277-
} else {
278-
completion(.failure(ParseError(code: .unknownError,
279-
message: error.localizedDescription)))
280-
}
281-
}
282-
}
268+
fetchCommand()
269+
.executeAsync(options: options,
270+
callbackQueue: callbackQueue,
271+
completion: completion)
283272
}
284273

285-
func fetchCommand() throws -> API.Command<Self, Self> {
274+
func fetchCommand() -> API.Command<Self, Self> {
286275

287276
return API.Command(method: .GET,
288277
path: endpoint) { (data) -> Self in

0 commit comments

Comments
 (0)