Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] [APPS] Warn message while installing app in air-gapped environment #20992

Merged
merged 3 commits into from
Mar 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions app/apps/server/communication/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class AppsRestApi {
// when there is no `response` field in the error, it means the request
// couldn't even make it to the server
if (!e.hasOwnProperty('response')) {
orchestrator.getRocketChatLogger().error(message, e.message);
orchestrator.getRocketChatLogger().warn(message, e.message);
return API.v1.internalError('Could not reach the Marketplace');
}

Expand Down Expand Up @@ -96,7 +96,7 @@ export class AppsRestApi {
headers,
});
} catch (e) {
return handleError('Error getting the App information from the Marketplace:', e);
return handleError('Unable to access Marketplace. Does the server has access to the internet?', e);
}

if (!result || result.statusCode !== 200) {
Expand Down Expand Up @@ -368,7 +368,7 @@ export class AppsRestApi {
headers,
});
} catch (e) {
return handleError('Error getting the App information from the Marketplace:', e);
return handleError('Unable to access Marketplace. Does the server has access to the internet?', e);
}

if (!result || result.statusCode !== 200 || result.data.length === 0) {
Expand All @@ -394,7 +394,7 @@ export class AppsRestApi {
headers,
});
} catch (e) {
return handleError('Error getting the App update info from the Marketplace:', e);
return handleError('Unable to access Marketplace. Does the server has access to the internet?', e);
}

if (result.statusCode !== 200 || result.data.length === 0) {
Expand Down Expand Up @@ -449,7 +449,6 @@ export class AppsRestApi {
npmRequestOptions: { encoding: null },
});
} catch (e) {
console.log(e, e.response.content.toString());
orchestrator.getRocketChatLogger().error('Error getting the App from the Marketplace:', e.response.data);
return API.v1.internalError();
}
Expand Down