Skip to content

Commit

Permalink
Improve Batch Set error lil bit (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
DZakh authored Oct 25, 2024
1 parent 4932a66 commit e9b03a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ module Int = {

external fromStringUnsafe: string => int = "Number"

let schema =
S.union([
S.int,
S.string->S.transform(_s => {parser: string => string->fromStringUnsafe}),
])->S.setName("GqlDbCustomTypes.Int")
let schema = S.union([
S.int,
S.string->S.transform(_s => {
parser: string => string->fromStringUnsafe,
serializer: Utils.magic,
}),
])->S.setName("GqlDbCustomTypes.Int")
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let makeBatchSet = (~table: Table.table, ~rowsSchema: S.schema<array<'entityRow>
| exception exn =>
exn->ErrorHandling.mkLogAndRaise(
~logger?,
~msg=`Failed during batch read of entity ${table.tableName}`,
~msg=`Failed during batch set of entity ${table.tableName}`,
)
| res => res
}
Expand Down

0 comments on commit e9b03a0

Please sign in to comment.