File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
cardano-db-sync/src/Cardano/DbSync/Era Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ insertRedeemerData tracer txId txd = do
88
88
case mRedeemerDataId of
89
89
Just redeemerDataId -> pure redeemerDataId
90
90
Nothing -> do
91
- value <- safeDecodeToJson tracer " insertRedeemerData " $ Generic. txDataValue txd
91
+ value <- safeDecodeToJson tracer " insertDatum: Column 'value' in table 'datum' " $ Generic. txDataValue txd
92
92
lift
93
93
. DB. insertRedeemerData
94
94
$ DB. RedeemerData
@@ -113,7 +113,7 @@ insertDatum tracer cache txId txd = do
113
113
case mDatumId of
114
114
Just datumId -> pure datumId
115
115
Nothing -> do
116
- value <- safeDecodeToJson tracer " insertDatum " $ Generic. txDataValue txd
116
+ value <- safeDecodeToJson tracer " insertRedeemerData: Column 'value' in table 'redeemer' " $ Generic. txDataValue txd
117
117
lift $
118
118
insertDatumAndCache cache (Generic. txDataHash txd) $
119
119
DB. Datum
@@ -203,7 +203,7 @@ insertScript tracer txId script = do
203
203
where
204
204
scriptConvert :: MonadIO m => Generic. TxScript -> m (Maybe Text )
205
205
scriptConvert s =
206
- maybe (pure Nothing ) (safeDecodeToJson tracer " insertScript" ) (Generic. txScriptJson s)
206
+ maybe (pure Nothing ) (safeDecodeToJson tracer " insertScript: Column 'json' in table 'script' " ) (Generic. txScriptJson s)
207
207
208
208
insertExtraKeyWitness ::
209
209
(MonadBaseControl IO m , MonadIO m ) =>
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ insertTxMetadata tracer txId inOpts mmetadata = do
260
260
mkDbTxMetadata (key, md) = do
261
261
let jsonbs = LBS. toStrict $ Aeson. encode (metadataValueToJsonNoSchema md)
262
262
singleKeyCBORMetadata = serialiseTxMetadataToCbor $ Map. singleton key md
263
- mjson <- safeDecodeToJson tracer " insertTxMetadata " jsonbs
263
+ mjson <- safeDecodeToJson tracer " prepareTxMetadata: Column 'json' in table 'metadata' " jsonbs
264
264
pure $
265
265
Just $
266
266
DB. TxMetadata
Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ safeDecodeToJson tracer tracePrefix x = do
47
47
-- See https://github.com/IntersectMBO/cardano-db-sync/issues/297
48
48
if containsUnicodeNul json
49
49
then do
50
- liftIO $ logWarning tracer $ tracePrefix <> " : dropped due to a Unicode NUL character. " <> json
50
+ liftIO $ logWarning tracer $ tracePrefix <> " was recorded as null, due to a Unicode NUL character found when trying to parse the json. "
51
51
pure Nothing
52
52
else pure $ Just json
You can’t perform that action at this time.
0 commit comments