mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: POST api/sessions returns 404 for a non-existing sessionId
parent
820be61905
commit
902470e7a4
|
@ -248,7 +248,7 @@ public abstract class SessionManager {
|
|||
|
||||
} else {
|
||||
this.sessionidTokenTokenobj.remove(sessionId);
|
||||
log.error("sessionId [" + sessionId + "] is not valid");
|
||||
log.error("sessionId [" + sessionId + "] was not found");
|
||||
throw new OpenViduException(Code.ROOM_NOT_FOUND_ERROR_CODE, "sessionId [" + sessionId + "] not found");
|
||||
}
|
||||
|
||||
|
|
|
@ -288,7 +288,8 @@ public class SessionRestController {
|
|||
}
|
||||
return new ResponseEntity<>(responseJson.toString(), getResponseHeaders(), HttpStatus.OK);
|
||||
} catch (OpenViduException e) {
|
||||
return this.generateErrorResponse(e.getMessage(), "/api/tokens", HttpStatus.BAD_REQUEST);
|
||||
// sessionId was not found
|
||||
return this.generateErrorResponse(e.getMessage(), "/api/tokens", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue