public IActionResult AddCode([FromBody] CodeDTO codeDTO) { try { _codeService.CodeValidation(codeDTO); _codeService.AddCode(codeDTO); return(Ok()); } catch (AuthenticationException) { return(Forbid()); } catch (ServiceException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { return(BadRequest(ex.StackTrace)); } }