Kitura / KituraKit

Swift client library for using Codable routes with Kitura
Apache License 2.0
59 stars 20 forks source link

Descriptive error handling additions #24

Closed ShihabMehboob closed 6 years ago

ShihabMehboob commented 6 years ago

Added better error handling (descriptions) to avoid using 'unknown' in errors which could be vague for users, especially those getting the error when the client wasn't connected to the server.

codecov-io commented 6 years ago

Codecov Report

Merging #24 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #24   +/-   ##
=======================================
  Coverage   71.96%   71.96%           
=======================================
  Files           2        2           
  Lines         132      132           
=======================================
  Hits           95       95           
  Misses         37       37
Flag Coverage Δ
#KituraKit 71.96% <0%> (ø) :arrow_up:
Impacted Files Coverage Δ
Sources/KituraKit/RequestErrorExtension.swift 27.27% <0%> (ø) :arrow_up:
Sources/KituraKit/Client.swift 76.03% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8ce52cd...23da389. Read the comment docs.

ianpartridge commented 6 years ago

These are a definite improvement!

Can we guide the user a bit more about how they might handle the errors if they see them?

ShihabMehboob commented 6 years ago

Sure, added brief guidance on how the user may handle the errors.

ianpartridge commented 6 years ago

Nice.