diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2020-01-23 01:40:57 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2020-01-23 01:41:51 +0100 |
commit | 4bb8e2043f2f7a79eafd78d3626c9807b44e62cf (patch) | |
tree | 2f8f00f72197a27dded49d9d57e17c7b8e24352d /sw-server/src/main/kotlin/org | |
parent | Fix server URL in react frontend (diff) | |
download | seven-wonders-4bb8e2043f2f7a79eafd78d3626c9807b44e62cf.tar.gz seven-wonders-4bb8e2043f2f7a79eafd78d3626c9807b44e62cf.tar.bz2 seven-wonders-4bb8e2043f2f7a79eafd78d3626c9807b44e62cf.zip |
Add kotlinx.serialization support to common model
Diffstat (limited to 'sw-server/src/main/kotlin/org')
-rw-r--r-- | sw-server/src/main/kotlin/org/luxons/sevenwonders/server/Converters.kt | 2 |
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") |