Don't use promise.catch since it's not supported in Firefox 29