Improve visualization for StatusRewrites option of errors middleware

This commit is contained in:
Daniel Peinhopf 2025-06-03 10:02:04 +02:00 committed by GitHub
parent ce1b13f228
commit fd5796ac39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,6 +60,12 @@ export const RenderUnknownProp = ({ name, prop, removeTitlePrefix }: RenderUnkno
switch (childName) { switch (childName) {
case 'ipStrategy': case 'ipStrategy':
return wrap(<IpStrategyTable ipStrategy={childProp as IpStrategy} />, title, title) return wrap(<IpStrategyTable ipStrategy={childProp as IpStrategy} />, title, title)
case 'statusRewrites':
return wrap(
<GenericTable items={Object.entries(childProp).map((x) => `${x[0]}${x[1]}`)} />,
title,
title,
)
default: default:
return <RenderUnknownProp key={title} name={title} prop={childProp} /> return <RenderUnknownProp key={title} name={title} prop={childProp} />
} }