@@ -268,22 +268,22 @@ def validate_wkt(wkt: str):
268268 }
269269
270270def _get_aria_baseline_stack (reference : str , opts : asf .ASFSearchOptions , output : str ):
271- if output .lower () == 'count' :
272- stack_opts = asf .Products .ARIAS1GUNWProduct .get_stack_opts_for_frame (int (reference ), opts = opts )
273- count = asf .search_count (opts = stack_opts )
274- return Response (
275- content = str (count ),
276- status_code = 200 ,
277- media_type = 'text/html; charset=utf-8' ,
278- headers = constants .DEFAULT_HEADERS
279- )
280- try :
281- stack = asf .stack_from_id (reference , opts = opts )
282- response_info = as_output (stack , output )
283- return Response (** response_info )
284- except (KeyError , IndexError , ValueError ) as exc :
285- raise HTTPException (detail = f"Reference scene not found with frame: { reference } " , status_code = 400 ) from exc
286-
271+ if output .lower () == 'count' :
272+ stack_opts = asf .Products .ARIAS1GUNWProduct .get_stack_opts_for_frame (int (reference ), opts = opts )
273+ count = asf .search_count (opts = stack_opts )
274+ return Response (
275+ content = str (count ),
276+ status_code = 200 ,
277+ media_type = 'text/html; charset=utf-8' ,
278+ headers = constants .DEFAULT_HEADERS
279+ )
280+ try :
281+ stack = asf .stack_from_id (reference , opts = opts )
282+ response_info = as_output (stack , output )
283+ return Response (** response_info )
284+ except (KeyError , IndexError , ValueError ) as exc :
285+ raise HTTPException (detail = f"Ran into an issue building stack for frame: { reference } \n Exception: { str ( exc ) } " , status_code = 400 ) from exc
286+
287287
288288@router .get ('/' , response_class = JSONResponse )
289289@router .get ('/health' , response_class = JSONResponse )
0 commit comments