summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2016-07-22 17:21:20 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-07-27 11:01:14 +0900
commit2e652aebab329e805beb8198dea6a064bd64ec1f (patch)
tree2df82baf339429c61214cad12314574cc6fdce8d /org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit
parentc15903ea3e69bee4a2fc99452e6cc4a9a7151da5 (diff)
downloadjgit-2e652aebab329e805beb8198dea6a064bd64ec1f.tar.gz
jgit-2e652aebab329e805beb8198dea6a064bd64ec1f.zip
FileLfsServlet: Return HTTP 422 instead of 400
According to the specification [1], the error response status code should be 422 when there is a validation error with one or more of the objects in the request [1] https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md#response-errors Change-Id: Id03fe00a2109b896d9a154228a14a33bce5accc3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
index 6c4f3cbb99..ac707eacf0 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
@@ -78,7 +78,7 @@ public class DownloadTest extends LfsServerTest {
getContent(id.name().substring(0, 60), f);
fail("expected RuntimeException");
} catch (RuntimeException e) {
- assertEquals("Status: 400 Bad Request",
+ assertEquals("Status: 422 Unprocessable Entity",
e.getMessage());
}
}
@@ -93,7 +93,7 @@ public class DownloadTest extends LfsServerTest {
getContent(id.name().replace('f', 'z'), f);
fail("expected RuntimeException");
} catch (RuntimeException e) {
- assertEquals("Status: 400 Bad Request",
+ assertEquals("Status: 422 Unprocessable Entity",
e.getMessage());
}
}