public async Task <JsonResponse> CreateLinkAsync([FromBody] CreateLinkRequest createLinkRequest) { try { var toBeCreatedLink = _mapper.Map <CreateLinkRequest, ILink>(createLinkRequest); await _linksService.CreateLinkAsync(toBeCreatedLink, base.User); return(new JsonResponse(null, HttpStatusCode.Created)); } catch (Exception ex) { await _logger.LogErrorAsync(ex.Message, ex).ConfigureAwait(false); // TODO: When creating a release, don't send ex.Message in response return(new JsonResponse(ex.Message, HttpStatusCode.BadRequest)); } }