Skip to content

Commit 6aaebaf

Browse files
method 2
1 parent 200bf63 commit 6aaebaf

2 files changed

Lines changed: 6 additions & 12 deletions

File tree

backend/graph-proxy/src/graphql/workflow_templates.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,21 +216,15 @@ impl WorkflowTemplatesQuery {
216216
} else {
217217
CLIENT.get(url)
218218
};
219-
220-
let response = request.send().await?;
221-
222-
if !response.status().is_success() {
223-
return Ok(Connection::new(false, false));
224-
}
225-
226-
let workflow_templates_response =
227-
response
219+
let workflow_templates_response = match request.send().await {
220+
Ok(resp) => resp
228221
.json::<APIResult<
229222
argo_workflows_openapi::IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateList,
230223
>>()
231224
.await?
232-
.into_result()?;
233-
225+
.into_result(),
226+
Err(_) => return Ok(Connection::new(false, false)),
227+
}?;
234228
let workflow_templates = workflow_templates_response
235229
.items
236230
.into_iter()

charts/graph-proxy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image:
22
registry: ghcr.io
33
repository: diamondlightsource/workflows-graph-proxy
44
tag: "jamesdoingstuff"
5-
digest: "sha256:e37fdb238014fbbb8d8ac8bfb5bc9b402c001ce33ed2b9ab845f883187c8e52e"
5+
digest: "sha256:8eee02f5b52389fcc10fd16b2d8a93750edb65d46d5423ec5266548f65cd3614"
66
pullPolicy: IfNotPresent
77
pullSecrets: []
88

0 commit comments

Comments
 (0)