Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- | 1 <!-- |
| 2 Copyright 2017 The LUCI Authors. All rights reserved. | 2 Copyright 2017 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="config-file-card.html"> | 7 <link rel="import" href="config-file-card.html"> |
| 8 <link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html"> | 8 <link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html"> |
| 9 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> | 9 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> |
| 10 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> | 10 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 _onRefreshError: function() { | 267 _onRefreshError: function() { |
| 268 this.isRefreshing = false; | 268 this.isRefreshing = false; |
| 269 this.refreshMessage = "Error: Files could not be refreshed."; | 269 this.refreshMessage = "Error: Files could not be refreshed."; |
| 270 this.fire('refreshError'); | 270 this.fire('refreshError'); |
| 271 }, | 271 }, |
| 272 | 272 |
| 273 _onRequestError: function(event) { | 273 _onRequestError: function(event) { |
| 274 var error = parseInt(event.detail.error.message.match(/\d+/g)); | 274 var error = parseInt(event.detail.error.message.match(/\d+/g)); |
| 275 this.isLoading = false; | 275 this.isLoading = false; |
| 276 if (error === 403) { | 276 if (error === 403) { |
| 277 this.errorMessage = "Authorization required to view this config set. " + | 277 this.errorMessage = "Access denied. If you are not signed in, please d o so. " + |
| 278 "Please sign in."; | 278 "Otherwise, try again later."; |
|
Sergey Berezin
2017/07/26 18:46:42
"Access denied" is probably the only thing that we
| |
| 279 } else if (500 <= error && error < 600) { | 279 } else if (500 <= error && error < 600) { |
| 280 this.errorMessage = "Internal server error."; | 280 this.errorMessage = "Internal server error."; |
| 281 } else { | 281 } else { |
| 282 this.errorMessage = "Error occured. Try again later."; | 282 this.errorMessage = "Error occured. Try again later."; |
| 283 } | 283 } |
| 284 this.fire('fetchError'); | 284 this.fire('fetchError'); |
| 285 } | 285 } |
| 286 | 286 |
| 287 }); | 287 }); |
| 288 </script> | 288 </script> |
| 289 </dom-module> | 289 </dom-module> |
| OLD | NEW |