public HttpResponseMessage GetById(Guid playlistId) { HttpResponseMessage response; CPlaylistInfo playlistInfo = new CPlaylistInfo(); try { CPlaylist playlist = _playlistContext.GetById(playlistId); playlistInfo = playlist.ToCPlaylistInfo(); response = Request.CreateResponse(HttpStatusCode.OK, playlistInfo); return(response); } catch (Exception e)// in case program crashes? { HttpContext.Current.Response.StatusCode = (Int32)HttpStatusCode.BadRequest; throw new ContextException(e.Message, e); } }