openvidu-server: add warn log on SessionRestController#generateErrorResponse

pull/609/head
pabloFuente 2021-02-17 19:22:21 +01:00
parent ff84eb128b
commit a35b8399a4
1 changed files with 1 additions and 0 deletions

View File

@ -1036,6 +1036,7 @@ public class SessionRestController {
responseJson.addProperty("error", status.getReasonPhrase()); responseJson.addProperty("error", status.getReasonPhrase());
responseJson.addProperty("message", errorMessage); responseJson.addProperty("message", errorMessage);
responseJson.addProperty("path", RequestMappings.API + path); responseJson.addProperty("path", RequestMappings.API + path);
log.warn("REST API error response to path {} ({}): {}", path, status.value(), errorMessage);
return new ResponseEntity<>(responseJson.toString(), RestUtils.getResponseHeaders(), status); return new ResponseEntity<>(responseJson.toString(), RestUtils.getResponseHeaders(), status);
} }