Skip to content

Commit 3908360

Browse files
committed
Don't use absolute paths for internal API call in config.
Also give better error messages when something is wrong.
1 parent 57520b5 commit 3908360

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

nodes/config.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h4>Connectivity check</h4>
143143
queryParams.set("token", token);
144144
}
145145

146-
const response = await fetch(`/seqera-config/workspaces?${queryParams}`, {
146+
const response = await fetch(`seqera-config/workspaces?${queryParams}`, {
147147
method: "GET",
148148
headers: {
149149
"Content-Type": "application/json",
@@ -229,7 +229,7 @@ <h4>Connectivity check</h4>
229229
queryParams.set("token", token);
230230
}
231231

232-
const response = await fetch(`/seqera-config/connectivity-check?${queryParams}`, {
232+
const response = await fetch(`seqera-config/connectivity-check?${queryParams}`, {
233233
method: "GET",
234234
headers: {
235235
"Content-Type": "application/json",
@@ -253,7 +253,13 @@ <h4>Connectivity check</h4>
253253
}
254254
}
255255
} else {
256-
updateConnectivityStatus("Server error occurred", false);
256+
const errorText = await response.text();
257+
console.error("Server error response:", {
258+
status: response.status,
259+
statusText: response.statusText,
260+
body: errorText,
261+
});
262+
updateConnectivityStatus(`Server error (${response.status}): ${response.statusText}`, false);
257263
clearWorkspaceDropdown("Server error");
258264
}
259265
} catch (error) {

0 commit comments

Comments
 (0)