Skip to content

Commit e96582c

Browse files
Avoid requests to entitycore for circuits with the ID 'undefined'
1 parent bbf239f commit e96582c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api/entitycore/queries/model/circuit.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export async function getCircuit({
6262
id: string;
6363
context?: WorkspaceContext | null;
6464
}) {
65+
if (id == null) {
66+
throw new Error(`circuit id is not valid ${id}`);
67+
}
6568
const api = await entityCoreApi();
6669
return await api.get<ICircuit>(`${baseUri}/${id}`, {
6770
headers: {

0 commit comments

Comments
 (0)