writefreely / writefreely-swift

A Swift package wrapping the WriteFreely / Write.as API
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Don't return early if we get a 404 on login attempt #22

Closed AngeloStavrow closed 4 years ago

AngeloStavrow commented 4 years ago

Closes #21.

This PR adds an .unknownError case to the WFError type and makes sure we return it if the error can't be generated from the server response (i.e., when trying to log in to a server that doesn't host a WriteFreely instance).