mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #22431 from mvdbeek/minor-api-fixes
[26.0] Minor api fixes for Sentry noise
This commit is contained in:
@@ -46,12 +46,16 @@ class GenomesManager:
|
||||
) -> Any:
|
||||
if reference:
|
||||
region = self.genomes.reference(trans, dbkey=id, chrom=chrom, low=low, high=high)
|
||||
if region is None:
|
||||
raise ReferenceDataError(f"No reference data for {id}")
|
||||
return {"dataset_type": "refseq", "data": region.sequence}
|
||||
else:
|
||||
return self.genomes.chroms(trans, dbkey=id, num=num, chrom=chrom, low=low)
|
||||
|
||||
def get_sequence(self, trans: ProvidesUserContext, id: str, chrom: str, low: int, high: int) -> Any:
|
||||
region = self.genomes.reference(trans, dbkey=id, chrom=chrom, low=low, high=high)
|
||||
if region is None:
|
||||
raise ReferenceDataError(f"No reference data for {id}")
|
||||
return region.sequence
|
||||
|
||||
def get_indexes(self, id: str, index_type: str) -> Any:
|
||||
|
||||
@@ -53,7 +53,7 @@ class HistoryController(BaseUIController, SharableMixin, UsesAnnotations, UsesIt
|
||||
return ""
|
||||
|
||||
@expose_api_anonymous
|
||||
def view(self, trans, id=None, show_deleted=False, show_hidden=False, use_panels=True):
|
||||
def view(self, trans, id=None, show_deleted=False, show_hidden=False, use_panels=True, **kwargs):
|
||||
"""
|
||||
View a history. If a history is importable, then it is viewable by any user.
|
||||
"""
|
||||
|
||||
@@ -173,7 +173,7 @@ class ToolRunner(BaseUIController):
|
||||
tool = self.__get_tool(tool_id)
|
||||
# No tool matching the tool id, display an error (shouldn't happen)
|
||||
if not tool:
|
||||
log.error("data_source_redirect called with tool id '%s' but no such tool exists", tool_id)
|
||||
log.debug("data_source_redirect called with tool id '%s' but no such tool exists", tool_id)
|
||||
trans.log_event(f"Tool id '{tool_id}' does not exist")
|
||||
trans.response.status = 404
|
||||
return trans.show_error_message(f"Tool '{escape(tool_id)}' does not exist.")
|
||||
|
||||
Reference in New Issue
Block a user