Visual improvements to debug mode for better information visibility
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
function createHttpBackgroundJson({
|
||||
previewDebugBody,
|
||||
DEBUG_BODY_LIMIT,
|
||||
environment
|
||||
}) {
|
||||
@@ -120,17 +121,7 @@ function createHttpBackgroundJson({
|
||||
}
|
||||
|
||||
function createDebugBody(text) {
|
||||
if (text.length > DEBUG_BODY_LIMIT) {
|
||||
return {
|
||||
value: `${text.slice(0, DEBUG_BODY_LIMIT)}\n... truncated ${text.length - DEBUG_BODY_LIMIT} characters`,
|
||||
truncated: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
value: text || "(empty response body)",
|
||||
truncated: false
|
||||
};
|
||||
return previewDebugBody(text, DEBUG_BODY_LIMIT);
|
||||
}
|
||||
|
||||
function normalizeDebugHeaders(headers) {
|
||||
|
||||
Reference in New Issue
Block a user