@hubspot/cms-lib
Advanced tools
Comparing version 1.1.8-beta.1 to 1.1.9-beta.0
@@ -16,2 +16,8 @@ const { | ||
}), | ||
response: { | ||
request: { | ||
href: 'http://example.com/', | ||
method: 'GET', | ||
}, | ||
}, | ||
message: `TEST ${method} ${statusCode}`, | ||
@@ -18,0 +24,0 @@ }); |
@@ -80,3 +80,15 @@ const { HubSpotAuthError } = require('@hubspot/api-auth-lib/Errors'); | ||
function debugErrorAndContext(error, context) { | ||
logger.debug('Error: %o', error); | ||
if (error.name === 'StatusCodeError') { | ||
const { statusCode, message, response } = error; | ||
logger.debug('Error: %o', { | ||
statusCode, | ||
message, | ||
url: response.request.href, | ||
method: response.request.method, | ||
response: response.body, | ||
headers: response.headers, | ||
}); | ||
} else { | ||
logger.debug('Error: %o', error); | ||
} | ||
logger.debug('Context: %o', context); | ||
@@ -83,0 +95,0 @@ } |
@@ -295,2 +295,6 @@ const fs = require('fs-extra'); | ||
); | ||
} else { | ||
logger.debug( | ||
`A ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} file could not be found` | ||
); | ||
} | ||
@@ -354,6 +358,9 @@ return; | ||
path || | ||
findup([ | ||
DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, | ||
DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME.replace('.yml', '.yaml'), | ||
]) | ||
findup( | ||
[ | ||
DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME, | ||
DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME.replace('.yml', '.yaml'), | ||
], | ||
{ cwd: getCwd() } | ||
) | ||
); | ||
@@ -640,3 +647,8 @@ }; | ||
} | ||
const { portalId } = getConfigVariablesFromEnv(); | ||
logger.debug( | ||
`Loaded config from enviroment variables for portal ${portalId}` | ||
); | ||
return setConfig(envConfig); | ||
@@ -643,0 +655,0 @@ }; |
{ | ||
"name": "@hubspot/cms-lib", | ||
"version": "1.1.8-beta.1", | ||
"version": "1.1.9-beta.0", | ||
"description": "Library for working with the HubSpot CMS", | ||
@@ -34,3 +34,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "37b5614bbc6308114b85756e8cad77635e5f8f7a" | ||
"gitHead": "053bc099d3cdaa0b897e98d08d3bd2f104eced4c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195382
6454