Instead of selecting specific errors to report as method errors, report
all API calls which return 400 or 500-series errors as method errors.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
}
}
- if(status == OSRF_STATUS_NOTFOUND || status == OSRF_STATUS_INTERNALSERVERERROR) {
+ // capture all 400's and 500's as method errors
+ if (status.match(/^4/) || status.match(/^5/)) {
if(req && req.onmethoderror)
return req.onmethoderror(req, status, status_text);
}