Skip to content

Commit

Permalink
better js error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Jul 17, 2024
1 parent f0707f5 commit e1c43b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion functions/executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Deno.serve(async (req) => {
status = 200;
response = { retval };
} catch (e) {
status = 500;
status = 207;
response = { error: toString(e), errorType: typeof e };
}

Expand Down
6 changes: 2 additions & 4 deletions recipes/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ def run_v2(
raise_for_status(r)
data = r.json()
response.logs = data.get("logs")
if r.ok:
response.return_value = data.get("retval")
else:
response.error = data.get("error")
response.return_value = data.get("retval")
response.error = data.get("error")

def render_form_v2(self):
st.text_area(
Expand Down

0 comments on commit e1c43b0

Please sign in to comment.