public async Task <ActionResult <ImportedSongListContract> > GetImport(string url, bool parseAll = true) { try { return(await _queries.Import(url, parseAll)); } catch (UnableToImportException x) { return(BadRequest(x.Message)); } }
public async Task <ImportedSongListContract> GetImport(string url, bool parseAll = true) { try { return(await queries.Import(url, parseAll)); } catch (UnableToImportException x) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.BadRequest) { ReasonPhrase = x.Message }); } }