Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small bug fix to configuration validation
Rawls changed the configuration payload field "methodStoreMethod" to "methodRepoMethod" We check for the existence of this field during validation, and we were checking by the old name. Fixed the field name in the configuration validation Added better failure descriptions to our require statements Added a validation exception so that we can avoid catching IllegalArgumentException at perRequest layer Changed perRequest to respond with BadRequest on validation errors, not IllegalArgumentException Changed methodStoreMethod -> methodRepoMethod in swagger, static test data
- Loading branch information
bradtaylor
committed
Sep 14, 2015
1 parent
0d245f1
commit 1ac96d6
Showing
7 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/scala/org/broadinstitute/dsde/agora/server/exceptions/ValidationException.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.broadinstitute.dsde.agora.server.exceptions | ||
|
||
import com.typesafe.scalalogging.slf4j.LazyLogging | ||
|
||
/** | ||
* Sugar over a generic underlying exception such that it can be handled properly higher in the system. | ||
* @param ex - The underlying exception | ||
*/ | ||
class ValidationException(ex: Throwable = null) extends Exception with LazyLogging { | ||
override def getCause: Throwable = ex | ||
override def getMessage: String = ex.getMessage | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters