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

Unified Diff: web/inc/logdog-stream/logdog-error.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/logdog-stream/logdog-error.html
diff --git a/web/inc/logdog-stream/logdog-error.html b/web/inc/logdog-stream/logdog-error.html
index 111ed0f920301de75350d5bdd69635f2d62274e5..af62c881639e19ae7029cf0a7fbd047025793fc9 100644
--- a/web/inc/logdog-stream/logdog-error.html
+++ b/web/inc/logdog-stream/logdog-error.html
@@ -24,9 +24,24 @@
return (this.base.name === "GrpcError");
};
LogDogError.prototype.isNotFound = function() {
- return (this.isGrpcError() && this.base.code === 5);
+ return (this.isGrpcError() && this.base.code === luci.rpc.Code.NOT_FOUND);
};
LogDogError.prototype.isUnauthenticated = function() {
- return (this.isGrpcError() && this.base.code === 16);
+ return (this.isGrpcError() &&
+ this.base.code === luci.rpc.Code.UNAUTHENTICATED);
+ };
+ LogDogError.prototype.isTransient = function() {
+ if ( ! this.isGrpcError() ) {
+ return false;
+ }
+ switch ( this.base.code ) {
+ case luci.rpc.Code.INTERNAL:
+ case luci.rpc.Code.UNAVAILABLE:
+ case luci.rpc.Code.RESOURCE_EXHAUSTED:
+ return true;
+
+ default:
+ return false;
+ }
};
</script>

Powered by Google App Engine
This is Rietveld 408576698