public async Task <JsonResponse> CreateFavoriteLinkAsync([FromBody] CreateFavoriteLinkRequest createFavoriteLinkRequest) { try { var toBeCreatedFavoriteLink = _mapper.Map <CreateFavoriteLinkRequest, ILink>(createFavoriteLinkRequest); await _linksService.CreateFavoriteLinkAsync(toBeCreatedFavoriteLink, 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)); } }