julien-c HF staff commited on
Commit
1fab9b0
1 Parent(s): 33e958f

Hide debug_info from API output

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def convert(s: str, theme: Literal["light", "dark"], debug_info: str) -> str:
30
  )
31
  except nbformat.reader.NotJSONError:
32
  print(400, f"Notebook is not JSON. {debug_info}")
33
- raise HTTPException(400, f"Notebook is not JSON. {debug_info}")
34
  except ValidationError as e:
35
  print(
36
  400,
@@ -38,7 +38,7 @@ def convert(s: str, theme: Literal["light", "dark"], debug_info: str) -> str:
38
  )
39
  raise HTTPException(
40
  400,
41
- f"Notebook is invalid according to nbformat: {e}. {debug_info}",
42
  )
43
 
44
  print(f"Input: nbformat v{notebook_node.nbformat}.{notebook_node.nbformat_minor}")
 
30
  )
31
  except nbformat.reader.NotJSONError:
32
  print(400, f"Notebook is not JSON. {debug_info}")
33
+ raise HTTPException(400, f"Notebook is not JSON.")
34
  except ValidationError as e:
35
  print(
36
  400,
 
38
  )
39
  raise HTTPException(
40
  400,
41
+ f"Notebook is invalid according to nbformat: {e}.",
42
  )
43
 
44
  print(f"Input: nbformat v{notebook_node.nbformat}.{notebook_node.nbformat_minor}")