Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show keyFromValues error #1268

Merged
merged 3 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions persistent/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for persistent

## 2.13.0.1

* [#1268](https://github.com/yesodweb/persistent/pull/1268)
* Show `keyFromValues` error
3kyro marked this conversation as resolved.
Show resolved Hide resolved

## 2.13.0.0

* [#1244](https://github.com/yesodweb/persistent/pull/1244)
Expand Down
4 changes: 2 additions & 2 deletions persistent/Database/Persist/Sql/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Database.Persist.Sql.Util
import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Maybe as Maybe
import Data.Monoid ((<>))
import Data.Text (Text, pack)
import Data.Text (Text, pack, unpack)
3kyro marked this conversation as resolved.
Show resolved Hide resolved
import qualified Data.Text as T

import Database.Persist
Expand Down Expand Up @@ -188,7 +188,7 @@ parseEntityValues t vals =
case fromPersistValues xs of
Left e -> Left e
Right xs' -> case keyFromValues keyvals of
Left _ -> error "fromPersistValuesComposite': keyFromValues failed"
Left err -> error $ "fromPersistValuesComposite': keyFromValues failed with error: " <> unpack err
3kyro marked this conversation as resolved.
Show resolved Hide resolved
Right key -> Right (Entity key xs')


Expand Down