@hubspot/local-dev-lib 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/apiErrors.js +3 -3
- package/package.json +1 -1
package/errors/apiErrors.js
CHANGED
|
@@ -83,7 +83,7 @@ function throwValidationError(error) {
|
|
|
83
83
|
function getAxiosErrorWithContext(
|
|
84
84
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
85
|
error, context = {}) {
|
|
86
|
-
const
|
|
86
|
+
const status = error.response?.status;
|
|
87
87
|
const method = error.config?.method;
|
|
88
88
|
const { projectName } = context;
|
|
89
89
|
let messageDetail;
|
|
@@ -106,8 +106,8 @@ error, context = {}) {
|
|
|
106
106
|
if ((method === 'put' || method === 'post') && context.payload) {
|
|
107
107
|
errorMessage.push((0, lang_1.i18n)(`${i18nKey}.unableToUpload`, { payload: context.payload }));
|
|
108
108
|
}
|
|
109
|
-
const isProjectMissingScopeError = isMissingScopeError(error) && projectName;
|
|
110
|
-
const isProjectGatingError = isGatingError(error) && projectName;
|
|
109
|
+
const isProjectMissingScopeError = isMissingScopeError(error) && !!projectName;
|
|
110
|
+
const isProjectGatingError = isGatingError(error) && !!projectName;
|
|
111
111
|
switch (status) {
|
|
112
112
|
case 400:
|
|
113
113
|
errorMessage.push((0, lang_1.i18n)(`${i18nKey}.codes.400`, { messageDetail }));
|
package/package.json
CHANGED