ripple / explorer

Open Source XRP Ledger Explorer
https://livenet.xrpl.org/
MIT License
111 stars 68 forks source link

fix: validator page validation vs ledger_closed race condition #917

Closed jonathanlei closed 8 months ago

jonathanlei commented 8 months ago

High Level Overview of Change

See issue https://github.com/ripple/explorer/issues/684

Context of Change

the validator page is stuck when retrieving info on a validator that has validated a ledger which doesn't have a state of validated or cannot be found, resulting in a "Something bad happened" page, see image: image

Solution: add error catching and log the error, return response anyway without last updated time and ledger index

Screenshot 2024-01-10 at 3 08 18 PM

Type of Change

Test Plan

added test in Validator.test.js

jonathanlei commented 8 months ago

LGTM - just one typo

oh I thought it's okay to use abbreviation haha i've used indx in other code before

JST5000 commented 8 months ago

oh I thought it's okay to use abbreviation haha i've used indx in other code before

It's not the end of the world, but it only saves a letter & can trip someone up when typing, so I figure writing it all out is better :)