public async Task <ActionResult <PartialImportedSongs> > GetImportSongs(string url, string pageToken, int maxResults = 20, bool parseAll = true) { try { return(await _queries.ImportSongs(url, pageToken, maxResults, parseAll)); } catch (UnableToImportException x) { return(BadRequest(x.Message)); } }
public async Task <PartialImportedSongs> GetImportSongs(string url, string pageToken, int maxResults = 20, bool parseAll = true) { try { return(await queries.ImportSongs(url, pageToken, maxResults, parseAll)); } catch (UnableToImportException x) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest) { ReasonPhrase = x.Message }); } }