diff --git a/client/components/History.tsx b/client/components/History.tsx index 5ef3254..395a5f6 100644 --- a/client/components/History.tsx +++ b/client/components/History.tsx @@ -17,6 +17,7 @@ import { Typography, } from "antd"; import dayjs from "dayjs"; +import { getReasonPhrase } from "http-status-codes"; import yaml from "js-yaml"; import orderBy from "lodash/orderBy"; import * as React from "react"; @@ -65,6 +66,16 @@ const EntryComponent = React.memo( responseStatusColor = "orange"; } } + + let responseStatusTitle = "Unknown HTTP status code"; + try { + responseStatusTitle = getReasonPhrase(value.response.status); + } catch { + if (value.response.status >= 600) { + responseStatusTitle = "Smocker error"; + } + } + return (