mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
improve network error handling, oauth2 logic cleanup, tls settings, and ui/test updates (#4444)
~ axios error interceptor fixes and timeline network logs ui updates ~ axios instance error interceptor now returns promise rejects instead of plain objects ~ fixed digest_auth regression ~ removed the interceptor logic for the oauth2 token url calls ~ timeline network logs ui updates ~ updated oauth2 test collections * ssl/tls fixes and error handling ~ set the min allowed tls version to 1.0 (TLSv1) ~ proxy/certs/tls setup error handling * enhance JSON stringification with circular reference handling - Add getCircularReplacer to safely handle circular references in objects - Update safeStringifyJSON to support indentation and handle undefined values ~ we currently support digest auth for bruno-cli --------- Co-authored-by: lohit <lohit@usebruno.com> Co-authored-by: Anoop M D <anoop.md1421@gmail.com>
This commit is contained in:
@@ -2,9 +2,17 @@ const Network = ({ logs }) => {
|
||||
return (
|
||||
<div className="bg-black/5 text-white network-logs rounded overflow-auto h-96">
|
||||
<pre className="whitespace-pre-wrap">
|
||||
{logs.map((entry, index) => (
|
||||
<NetworkLogsEntry key={index} entry={entry} />
|
||||
))}
|
||||
{logs.map((currentLog, index) => {
|
||||
if (index > 0 && currentLog?.type === 'separator') {
|
||||
return <div className="border-t-2 border-gray-500 w-full my-2" key={index} />;
|
||||
}
|
||||
const nextLog = logs[index + 1];
|
||||
const isSameLogType = nextLog?.type === currentLog?.type;
|
||||
return <>
|
||||
<NetworkLogsEntry key={index} entry={currentLog} />
|
||||
{!isSameLogType && <div className="mt-4"/>}
|
||||
</>;
|
||||
})}
|
||||
</pre>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -141,7 +141,7 @@ const ResponsePane = ({ rightPaneWidth, item, collection }) => {
|
||||
)}
|
||||
{focusedTab?.responsePaneTab === "timeline" ? (
|
||||
<ClearTimeline item={item} collection={collection} />
|
||||
) : item?.response ? (
|
||||
) : (item?.response && !item?.response?.error) ? (
|
||||
<>
|
||||
<ResponseClear item={item} collection={collection} />
|
||||
<ResponseSave item={item} />
|
||||
|
||||
@@ -5,6 +5,10 @@ export const sendNetworkRequest = async (item, collection, environment, runtimeV
|
||||
if (['http-request', 'graphql-request'].includes(item.type)) {
|
||||
sendHttpRequest(item, collection, environment, runtimeVariables)
|
||||
.then((response) => {
|
||||
// if there is an error, we return the response object as is
|
||||
if (response?.error) {
|
||||
resolve(response)
|
||||
}
|
||||
resolve({
|
||||
state: 'success',
|
||||
data: response.data,
|
||||
|
||||
Reference in New Issue
Block a user