| Index: web/inc/rpc/rpc-call.html
|
| diff --git a/web/inc/rpc/rpc-call.html b/web/inc/rpc/rpc-call.html
|
| index 7f317bb05fe25efaa979608c3c4eec41ef349022..6f404969d328ad3d4b60063ab0d76298fb5ccbdd 100644
|
| --- a/web/inc/rpc/rpc-call.html
|
| +++ b/web/inc/rpc/rpc-call.html
|
| @@ -202,15 +202,14 @@
|
|
|
| _done: function(error) {
|
| try {
|
| - var status = this.xhr.status;
|
| - if (error && typeof status !== 'number') {
|
| + if (error && typeof this.xhr.status !== 'number') {
|
| // We didn't receive the response.
|
| throw error;
|
| }
|
|
|
| var codeHeader = this.xhr.getResponseHeader('X-Prpc-Grpc-Code');
|
| if (!codeHeader) {
|
| - throw new luci.rpc.HttpError( status,
|
| + throw Error(
|
| 'Invalid response: no X-Prpc-Grpc-Code response header');
|
| }
|
|
|
| @@ -220,7 +219,7 @@
|
| throw Error('code is not defined');
|
| }
|
| } catch (e) {
|
| - throw new luci.rpc.HttpError( status,
|
| + throw Error(
|
| 'Invalid X-Prpc-Grpc-Code response header "' + codeHeader +
|
| '": ' + e
|
| );
|
|
|