summaryrefslogtreecommitdiff
path: root/sw-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sw-server/src/main')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt
index 7e1a6fdf..3958260c 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt
@@ -7,7 +7,7 @@ import org.springframework.validation.ObjectError
fun ObjectError.toDTO() = (this as? FieldError)?.fieldError() ?: objectError()
fun FieldError.fieldError(): ValidationErrorDTO =
- ValidationErrorDTO("$objectName.$field", "Invalid value for field '$field': $defaultMessage", rejectedValue)
+ ValidationErrorDTO("$objectName.$field", "Invalid value for field '$field': $defaultMessage", rejectedValue?.toString())
fun ObjectError.objectError(): ValidationErrorDTO =
ValidationErrorDTO(objectName, "Invalid value for object '$objectName': $defaultMessage")
bgstack15