cleanup debug logging
This commit is contained in:
+3
-10
@@ -204,20 +204,13 @@ const fetchWithDebug = async (
|
||||
url: string,
|
||||
config: RequestInit = {}
|
||||
): Promise<Response> => {
|
||||
const debugLogs = core.isDebug()
|
||||
if (debugLogs) {
|
||||
core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`)
|
||||
}
|
||||
core.debug(`Request from ${url} with config: ${JSON.stringify(config)}`)
|
||||
try {
|
||||
const response = await fetch(url, config)
|
||||
if (debugLogs) {
|
||||
core.debug(`Response with ${JSON.stringify(response)}`)
|
||||
}
|
||||
core.debug(`Response with ${JSON.stringify(response)}`)
|
||||
return response
|
||||
} catch (error) {
|
||||
if (debugLogs) {
|
||||
core.debug(`Error with ${error}`)
|
||||
}
|
||||
core.debug(`Error with ${error}`)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user