Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
properly generate coding path for errors, fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed May 9, 2018
1 parent 0fe0255 commit 57cf7fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/Packages
/*.xcodeproj
Package.resolved
DerivedData
2 changes: 1 addition & 1 deletion Sources/URLEncodedForm/Codable/URLEncodedFormDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private final class _URLEncodedFormKeyedDecoder<K>: KeyedDecodingContainerProtoc
func decode<T>(_ type: T.Type, forKey key: K) throws -> T where T: Decodable {
if let convertible = T.self as? URLEncodedFormDataConvertible.Type {
guard let data = context.data.get(at: codingPath + [key]) else {
throw DecodingError.typeMismatch(T.self, at: codingPath)
throw DecodingError.typeMismatch(T.self, at: codingPath + [key])
}
return try convertible.convertFromURLEncodedFormData(data) as! T
} else {
Expand Down

0 comments on commit 57cf7fb

Please sign in to comment.