Skip to content

Commit

Permalink
409s are no longer being returned as 500s
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Murphy committed Oct 22, 2009
1 parent 8796f11 commit 93fc45d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/browser/xhr.js
Expand Up @@ -272,8 +272,15 @@ function sendData(entityBody){
// HttpUrlConnection will throw FileNotFoundException on 404 errors. FIXME: others?
if (e.javaException instanceof java.io.FileNotFoundException)
input = new IO(connection.getErrorStream(), null);
else
throw e;
else {
try {
this.status = Number(connection.getResponseCode());
this.statusText = String(connection.getResponseMessage());
return;
} catch (err) {
throw e;
}
}
}

this.status = Number(connection.getResponseCode());
Expand Down

0 comments on commit 93fc45d

Please sign in to comment.