Skip to content

Commit

Permalink
✨ React to study:open 409 error code (#3618)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Nov 29, 2022
1 parent 5d3fdaa commit 9152bf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ qx.Class.define("osparc.desktop.StudyEditor", {
})
.catch(err => {
let msg = "";
if ("status" in err && err["status"] == 423) { // Locked
if ("status" in err && err["status"] == 409) { // max_open_studies_per_user
msg = err["message"];
} else if ("status" in err && err["status"] == 423) { // Locked
msg = study.getName() + this.tr(" is already opened");
} else {
console.error(err);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ def __init__(self, user_id: UserID, project_uuid: ProjectID):
class ProjectTooManyProjectOpened(ProjectsException):
def __init__(self, max_num_projects: int):
super().__init__(
f"You cannot open more than {max_num_projects} stud{'y' if max_num_projects == 1 else 'ies'} concurrently. Please close another project and retry."
f"You cannot open more than {max_num_projects} stud{'y' if max_num_projects == 1 else 'ies'} at once. Please, close another study and retry."
)

0 comments on commit 9152bf8

Please sign in to comment.