@reproapp/mcp 0.0.2 → 0.0.3
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/package.json +1 -1
- package/src/index.js +13 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -810,7 +810,7 @@ function shouldRetryWithInteractiveAuth(error, config) {
|
|
|
810
810
|
return false;
|
|
811
811
|
}
|
|
812
812
|
const statusCode = error && typeof error === 'object' ? error.statusCode : null;
|
|
813
|
-
return statusCode === 401;
|
|
813
|
+
return statusCode === 401 && !isRemoteAuthConfigurationError(error);
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
function shouldRetryApiWithInteractiveAuth(error, config) {
|
|
@@ -821,6 +821,18 @@ function shouldRetryApiWithInteractiveAuth(error, config) {
|
|
|
821
821
|
return statusCode === 401 || statusCode === 403;
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
+
function isRemoteAuthConfigurationError(error) {
|
|
825
|
+
if (!error || typeof error !== 'object') {
|
|
826
|
+
return false;
|
|
827
|
+
}
|
|
828
|
+
const messages = [
|
|
829
|
+
typeof error.message === 'string' ? error.message : '',
|
|
830
|
+
typeof error.details?.error === 'string' ? error.details.error : '',
|
|
831
|
+
typeof error.details?.message === 'string' ? error.details.message : '',
|
|
832
|
+
];
|
|
833
|
+
return messages.some((message) => message.includes('App-user bearer auth is not configured'));
|
|
834
|
+
}
|
|
835
|
+
|
|
824
836
|
function resolveAuthFilePath(value) {
|
|
825
837
|
if (typeof value === 'string' && value.trim()) {
|
|
826
838
|
return path.resolve(value.trim());
|