awacke1 commited on
Commit
433b1ed
·
verified ·
1 Parent(s): 759730a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -26,8 +26,14 @@ def call_stored_procedure(record):
26
  )
27
  return True, response
28
  except Exception as e:
29
- return False, str(e)
 
 
 
 
 
30
 
 
31
  # Streamlit app
32
  st.title("🌟 Cosmos DB Record Insertion and Procedure Execution")
33
 
 
26
  )
27
  return True, response
28
  except Exception as e:
29
+ error_message = f"Error type: {type(e).__name__}\nError message: {str(e)}"
30
+ if hasattr(e, 'sub_status'):
31
+ error_message += f"\nSub-status: {e.sub_status}"
32
+ if hasattr(e, 'response'):
33
+ error_message += f"\nResponse: {e.response}"
34
+ return False, error_message
35
 
36
+
37
  # Streamlit app
38
  st.title("🌟 Cosmos DB Record Insertion and Procedure Execution")
39