Throw an error if encoding fails

This commit is contained in:
Jonathan Bennett 2020-11-12 23:09:36 -05:00
parent 21c2787f90
commit c594878cf5

View File

@ -119,7 +119,8 @@ final class FeedWranglerAPICaller: NSObject {
]
guard let url = postData?.urlWithEnhancedPercentEncodedQuery else {
fatalError() // something has gone terribly wrong
completion(.failure(FeedWranglerError.general(message: "Could not encode name")))
return
}
standardSend(url: url, resultType: FeedWranglerSubscriptionsRequest.self) { result in