Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: web/inc/rpc/rpc-call.html

Issue 2543323004: Rewrite LogDog log viewer app. (Closed)
Patch Set: Control all fetch sizes, fix follow on initial click, fix small fetch when auth is retrid. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: web/inc/rpc/rpc-call.html
diff --git a/web/inc/rpc/rpc-call.html b/web/inc/rpc/rpc-call.html
index 6f404969d328ad3d4b60063ab0d76298fb5ccbdd..7f317bb05fe25efaa979608c3c4eec41ef349022 100644
--- a/web/inc/rpc/rpc-call.html
+++ b/web/inc/rpc/rpc-call.html
@@ -202,14 +202,15 @@
_done: function(error) {
try {
- if (error && typeof this.xhr.status !== 'number') {
+ var status = this.xhr.status;
+ if (error && typeof status !== 'number') {
// We didn't receive the response.
throw error;
}
var codeHeader = this.xhr.getResponseHeader('X-Prpc-Grpc-Code');
if (!codeHeader) {
- throw Error(
+ throw new luci.rpc.HttpError( status,
'Invalid response: no X-Prpc-Grpc-Code response header');
}
@@ -219,7 +220,7 @@
throw Error('code is not defined');
}
} catch (e) {
- throw Error(
+ throw new luci.rpc.HttpError( status,
'Invalid X-Prpc-Grpc-Code response header "' + codeHeader +
'": ' + e
);

Powered by Google App Engine
This is Rietveld 408576698