Skip to content

Commit

Permalink
Now feeding raw json
Browse files Browse the repository at this point in the history
  • Loading branch information
henrik-dmg committed Apr 10, 2020
1 parent f6c5de7 commit d53c7f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/HPNetwork/NSError+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ extension NSError {
}

func injectJSON(_ data: Data) -> NSError {
guard let jsonData = try? JSONSerialization.data(withJSONObject: data, options: .prettyPrinted) else {
return self
}

let jsonString = String(data: jsonData, encoding: .utf8)
let jsonString = String(data: data, encoding: .utf8)

var dict = userInfo
dict[NSError.hpCodableDataKey] = jsonString
Expand Down

0 comments on commit d53c7f3

Please sign in to comment.