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

Show http request code to avoid random failures with empty error #4237

Merged
merged 1 commit into from
May 15, 2017

Conversation

madhurig
Copy link
Contributor

@madhurig madhurig commented May 4, 2017

No description provided.

@@ -171,34 +177,34 @@ function publishRelease(apiServer: string, releaseUrl: string, releaseNotes: str
* If the input is a single folder, zip it's content. The archive name is the folder's name
* If the input is a set of folders or files, zip them so they appear on the root of the archive. The archive name is the parent folder's name.
*/
function prepareSymbols(symbolsPaths: string[]): Q.Promise<string> {
function prepareSymbols(symbolsPaths: string[]): Q.Promise<string> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting changes (Shift + Option + F) in VSCode on macOS.

message = `http response code: ${res.statusCode}`;
} else {
message = message.concat(os.EOL + `http response code: ${res.statusCode}`);
}
defer.reject(message);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also use ${JSON.stringify(err)} instead of just ${err} at the end of the file. Also, tl.error(...) call won't hurt before tl.setResult(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both suggestions while they don't hurt are not required. Based on my experiments with node REPL, I am fairly confident about the fix I made being sufficient :). At least we will always get the http response code every time.

@madhurig madhurig merged commit acefc3a into master May 15, 2017
@madhurig madhurig deleted the users/mg/mcupload branch May 15, 2017 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants