files/en-us/web/api/backgroundfetchregistration/failurereason/index.md
{{APIRef("Background Fetch API")}}{{SeeCompatTable}}{{AvailableInWorkers}}
The failureReason read-only property of the {{domxref("BackgroundFetchRegistration")}} interface returns a string with a value that indicates a reason for a background fetch failure.
If the value of this property changes, the progress event is fired at the associated {{domxref("BackgroundFetchRegistration")}} object.
One of the following strings:
""
"aborted"
"bad-status"
"fetch-error"
"quota-exceeded"
"download-total-exceeded"
downloadTotal was exceeded. This value was set when the background fetch was registered.Logging this property to the console prints the reason the fetch failed, or an empty string if it was successful or has not yet completed.
console.log(bgFetch.failureReason);
{{Specifications}}
{{Compat}}