Web view still in progress
This commit is contained in:
@@ -49,7 +49,7 @@ data class MainCritParams(
|
||||
val additionalPlacementCritSystem1: Criterion = Criterion.RATING,
|
||||
val additionalPlacementCritSystem2: Criterion = Criterion.NONE,
|
||||
) {
|
||||
enum class DrawUpDown {TOP, MIDDLE, BOTTOM}
|
||||
enum class DrawUpDown { TOP, MIDDLE, BOTTOM }
|
||||
enum class SeedMethod { SPLIT_AND_FOLD, SPLIT_AND_RANDOM, SPLIT_AND_SLIP }
|
||||
companion object {
|
||||
const val MAX_CATEGORIES_WEIGHT = 20000000000000.0 // 2e13
|
||||
|
@@ -235,7 +235,7 @@ class ApiServlet : HttpServlet() {
|
||||
cause: Throwable? = null
|
||||
) {
|
||||
try {
|
||||
if (code == 500) {
|
||||
if (code == 500 || response.isCommitted) {
|
||||
logger.error(
|
||||
"Request {} {} gave error {} {}",
|
||||
request.method,
|
||||
@@ -245,7 +245,13 @@ class ApiServlet : HttpServlet() {
|
||||
cause
|
||||
)
|
||||
}
|
||||
response.sendError(code, message)
|
||||
response.status = code
|
||||
if (response.isCommitted) return
|
||||
val errorPayload = Json.Object(
|
||||
"error" to (message ?: "unknown error")
|
||||
)
|
||||
setContentType(response)
|
||||
errorPayload.toString(response.writer)
|
||||
} catch (ioe: IOException) {
|
||||
logger.error("Could not send back error", ioe)
|
||||
}
|
||||
|
Reference in New Issue
Block a user