Skip to content

Commit

Permalink
more api
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 20, 2025
1 parent b84cf47 commit 32c9a39
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.02152627.css",
"main.js": "/static/js/main.71a4daeb.js",
"main.js": "/static/js/main.16008c40.js",
"static/media/roboto-all-500-normal.woff": "/static/media/roboto-all-500-normal.0ab669b7a0d19b178f57.woff",
"static/media/roboto-all-700-normal.woff": "/static/media/roboto-all-700-normal.a457fde362a540fcadff.woff",
"static/media/roboto-all-400-normal.woff": "/static/media/roboto-all-400-normal.c5d001fa922fa66a147f.woff",
Expand Down Expand Up @@ -36,10 +36,10 @@
"static/media/roboto-greek-ext-700-normal.woff2": "/static/media/roboto-greek-ext-700-normal.bd9854c751441ccc1a70.woff2",
"index.html": "/index.html",
"main.02152627.css.map": "/static/css/main.02152627.css.map",
"main.71a4daeb.js.map": "/static/js/main.71a4daeb.js.map"
"main.16008c40.js.map": "/static/js/main.16008c40.js.map"
},
"entrypoints": [
"static/css/main.02152627.css",
"static/js/main.71a4daeb.js"
"static/js/main.16008c40.js"
]
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.71a4daeb.js"></script><link href="/static/css/main.02152627.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Pioreactor"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.16008c40.js"></script><link href="/static/css/main.02152627.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
5 changes: 4 additions & 1 deletion pioreactorui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ def handle_not_auth(e):

@app.errorhandler(500)
def handle_server_error(e):
return jsonify({"error": "Internal server error. See logs."}), 500
return (
jsonify({"error": f"Internal server error: {e.description}. See logs for more."}),
500,
)

app.json = MsgspecJsonProvider(app)
app.get_json = app.json.loads
Expand Down
4 changes: 2 additions & 2 deletions pioreactorui/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ def update_experiment_profile() -> ResponseReturnValue:
yaml_decode(experiment_profile_body, type=Profile)
except Exception as e:
# publish_to_error_log(msg, "create_experiment_profile")
return {"msg": str(e)}, 400
abort(400, str(e))

# verify file - user could have provided a different filename so we still check this.
try:
Expand Down Expand Up @@ -1841,7 +1841,7 @@ def setup_worker_pioreactor() -> ResponseReturnValue:
if status:
return {"msg": f"Worker {new_name} added successfully."}, 200
else:
return {"msg": f"Failed to add worker {new_name}. See logs."}, 500
abort(500, f"Failed to add worker {new_name}. See logs.")


@api.route("/workers", methods=["PUT"])
Expand Down
6 changes: 3 additions & 3 deletions static/js/main.71a4daeb.js → static/js/main.16008c40.js

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

0 comments on commit 32c9a39

Please sign in to comment.