@@ -157,18 +157,18 @@ class Server(handler: RequestHandler) extends HttpApp
157
157
id.toString
158
158
}
159
159
case Failure (ex) =>
160
- log.error(ex, " Failed to handle registration of instance." )
160
+ log.warning( s " Failed to handle registration of instance. ${ex.getMessage} " )
161
161
complete(HttpResponse (StatusCodes .InternalServerError , entity = " An internal server error occurred." ))
162
162
}
163
163
} catch {
164
164
case dx : DeserializationException =>
165
- log.error(dx, " Deserialization exception" )
166
- complete(HttpResponse (StatusCodes .BadRequest , entity = s " Could not deserialize parameter instance with message ${dx.getMessage}. " ))
165
+ log.warning( s " Deserialization exception: ${dx.msg} " )
166
+ complete(HttpResponse (StatusCodes .BadRequest , entity = s " Could not deserialize parameter instance with message: ${dx.getMessage}. " ))
167
167
case px : ParsingException =>
168
- log.error(px, " Failed to parse JSON while registering" )
169
- complete(HttpResponse (StatusCodes .BadRequest , entity = s " Failed to parse JSON entity with message ${px.getMessage}" ))
168
+ log.warning( s " Failed to parse JSON while registering: ${px.summary} " )
169
+ complete(HttpResponse (StatusCodes .BadRequest , entity = s " Failed to parse JSON entity with message: ${px.getMessage}" ))
170
170
case x : Exception =>
171
- log.error(x, " Uncaught exception while deserializing. " )
171
+ log.warning( " Uncaught exception while deserializing" )
172
172
complete(HttpResponse (StatusCodes .InternalServerError , entity = " An internal server error occurred." ))
173
173
}
174
174
}
@@ -237,7 +237,7 @@ class Server(handler: RequestHandler) extends HttpApp
237
237
}
238
238
}
239
239
else {
240
- log.error (s " Failed to deserialize parameter string $compTypeString to ComponentType. " )
240
+ log.warning (s " Failed to deserialize parameter string $compTypeString to ComponentType. " )
241
241
complete(HttpResponse (StatusCodes .BadRequest , entity = s " Could not deserialize parameter string $compTypeString to ComponentType " ))
242
242
}
243
243
}
@@ -271,7 +271,7 @@ class Server(handler: RequestHandler) extends HttpApp
271
271
}
272
272
}
273
273
else {
274
- log.error (s " Failed to deserialize parameter string $compTypeString to ComponentType. " )
274
+ log.warning (s " Failed to deserialize parameter string $compTypeString to ComponentType. " )
275
275
complete(HttpResponse (StatusCodes .BadRequest , entity = s " Could not deserialize parameter string $compTypeString to ComponentType " ))
276
276
}
277
277
}
0 commit comments