Skip to content

fix: handle error types serialization errors#22379

Merged
PhilWindle merged 1 commit intomerge-train/spartanfrom
spl/handle-err-format-err
Apr 8, 2026
Merged

fix: handle error types serialization errors#22379
PhilWindle merged 1 commit intomerge-train/spartanfrom
spl/handle-err-format-err

Conversation

@spalladino
Copy link
Copy Markdown
Contributor

Do not throw in the logger when we try to log something that fails during serialization.

I ran into this while playing with a test script:

TypeError: Cannot read properties of undefined (reading 'value')                                         
    at formatProperty (node:internal/util/inspect:2280:12)                                               
    at formatRaw (node:internal/util/inspect:1176:9)                                                     
    at formatValue (node:internal/util/inspect:932:10)                                                   
    at inspect (node:internal/util/inspect:409:10)                                                       
    at formatErr                                                                                         
(file:///home/santiago/Projects/aztec-3/yarn-project/foundation/dest/log/pino-logger.js:326:29)          
    at Object.error                                                                                      
(file:///home/santiago/Projects/aztec-3/yarn-project/foundation/dest/log/pino-logger.js:56:97)           
    at L2BlockStream.work (file:///home/santiago/Projects/aztec-3/yarn-project/stdlib/dest/block/l2_bloc 
k_stream/l2_block_stream.js:222:22)                                                                      
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)                       
    at async L2BlockStream.sync (file:///home/santiago/Projects/aztec-3/yarn-project/stdlib/dest/block/l 
2_block_stream/l2_block_stream.js:46:9)                                                                  
    at async BlockSynchronizer.doSync (file:///home/santiago/Projects/aztec-3/yarn-project/pxe/dest/bloc 
k_synchronizer/block_synchronizer.js:157:9)                                                              
[18:27:08.952] INFO: teardown-failure:pxe:service Simulating transaction execution request to 0xf04908a9 
 at 0x0000000000000000000000000000000000000000000000000000000000000004                                   
{"origin":"0x0000000000000000000000000000000000000000000000000000000000000004","functionSelector":"0xf04 
908a9","simulatePublic":true,"chainId":"0x0000000000000000000000000000000000000000000000000000000000aa36 
a7","version":"0x000000000000000000000000000000000000000000000000000000009a3a0b73","authWitnesses":["0x2 
983e158c25f7487e066bfa57d58f43340b2b45a114e6d6934dbc95213778ee6"]}                                       
[18:27:09.301] ERROR: teardown-failure:pxe:service TypeError: TypeError: Cannot read properties of       
undefined (reading 'value')                                                                              
    at formatProperty (node:internal/util/inspect:2280:12)                                               
    at formatRaw (node:internal/util/inspect:1176:9)                                                     
    at formatValue (node:internal/util/inspect:932:10)                                                   
    at inspect (node:internal/util/inspect:409:10)                                                       
    at formatErr                                                                                         
(file:///home/santiago/Projects/aztec-3/yarn-project/foundation/dest/log/pino-logger.js:326:29)          
    at Object.error                                                                                      
(file:///home/santiago/Projects/aztec-3/yarn-project/foundation/dest/log/pino-logger.js:56:97)           
    at L2BlockStream.work (file:///home/santiago/Projects/aztec-3/yarn-project/stdlib/dest/block/l2_bloc 
k_stream/l2_block_stream.js:222:22)                                                                      
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)                       
    at async L2BlockStream.sync (file:///home/santiago/Projects/aztec-3/yarn-project/stdlib/dest/block/l 
2_block_stream/l2_block_stream.js:46:9)                                                                  
    at async BlockSynchronizer.doSync (file:///home/santiago/Projects/aztec-3/yarn-project/pxe/dest/bloc 
k_synchronizer/block_synchronizer.js:157:9)                                                              

Do not throw in the logger when we try to log something that fails
during serialization.
@PhilWindle PhilWindle merged commit 5a4b0b6 into merge-train/spartan Apr 8, 2026
12 checks passed
@PhilWindle PhilWindle deleted the spl/handle-err-format-err branch April 8, 2026 08:49
github-merge-queue bot pushed a commit that referenced this pull request Apr 9, 2026
BEGIN_COMMIT_OVERRIDE
chore: fix mempool limit test (#22332)
fix(bot): bot fee juice funding (#21949)
fix(foundation): flush current batch on BatchQueue.stop() (#22341)
chore: (A-750) read JSON body then parse to avoid double stream
consumption on error message (#22247)
chore: bump log level in stg-public (#22354)
chore: fix main.tf syntax (#22356)
chore: wire up spartan checks to make (#22358)
fix(p2p): reduce flakiness in proposal tx collector benchmark (#22240)
fix: disable sponsored fpc and test accounts for devnet (#22331)
chore: add v4-devnet-3 to tf network ingress (#22327)
chore: remove unused env var (#22365)
chore: add pdb (#22364)
chore: dispatch CB on failed deployments (#22367)
chore: (A-749) single character url join (#22269)
feat: support different docker image for HA validator nodes (#22371)
chore: fix the daily healthchecks (#22373)
chore: remove v4-devnet-2 references (#22372)
fix: rename #team-alpha → #e-team-alpha slack channel (#22374)
chore(pipeline): timetable adjustments under pipelining (#21076)
feat(pipeline): handle pipeline prunes (#21250)
fix: handle error types serialization errors (#22379)
feat(spartan): configurable HA validator replica count (#22384)
fix(e2e): increase prune timeout in epochs_mbps_pipeline test (#22392)
fix(epoch-cache): use TTL-based caching with finalization tracking and
correct lag (#22204)
chore: deflake e2e ha sync test (#22403)
chore(ci): skip prunes-uncheckpointed test in epochs_mbps_pipeline
(#22401)
refactor(slasher): remove empire slasher model (#21830)
fix: use strict equality in world-state ops queue (#22398)
fix: remove unused BLOCK reqresp sub-protocol (#22407)
refactor(sequencer): sign last block before archiver sync (#22117)
feat(world-state): add genesis timestamp support and GenesisData type
(#22359)
fix: use Int64Value instead of Uint32Value for 64-bit map sizes (#22400)
chore: Reduce logging verbosity (#22423)
fix(p2p): include values in tx validation error messages (#22422)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants