mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 977931 - return an error object even when restResponse.headers is null. r=spenrose
This commit is contained in:
parent
ccf959aa2f
commit
744d2d3b48
@ -71,7 +71,7 @@ this.HawkClient.prototype = {
|
||||
code: restResponse.status,
|
||||
errno: restResponse.status
|
||||
};
|
||||
let retryAfter = restResponse.headers["retry-after"];
|
||||
let retryAfter = restResponse.headers && restResponse.headers["retry-after"];
|
||||
retryAfter = retryAfter ? parseInt(retryAfter) : retryAfter;
|
||||
if (retryAfter) {
|
||||
errorObj.retryAfter = retryAfter;
|
||||
|
Loading…
Reference in New Issue
Block a user