File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
backend/argo-workflows-openapi Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,11 @@ use std::{
8
8
use typify:: { TypeSpace , TypeSpaceSettings } ;
9
9
10
10
fn main ( ) {
11
- let raw_schema = reqwest:: blocking:: get ( env:: var ( "ARGO_SERVER_SCHEMA_URL" ) . unwrap ( ) )
12
- . unwrap ( )
13
- . text ( )
14
- . unwrap ( ) ;
11
+ let argo_server_schema_url =
12
+ env:: var ( "ARGO_SERVER_SCHEMA_URL" ) . expect ( "ARGO_SERVER_SCHEMA_URL environment is not set." ) ;
13
+ let raw_schema = reqwest:: blocking:: get ( & argo_server_schema_url)
14
+ . and_then ( |response| response. text ( ) )
15
+ . expect ( & format ! ( "Failed to retrieve argo server schema from {argo_server_schema_url}. Is ARGO_SERVER_SCHEMA_URL environment variable set?" ) ) ;
15
16
let mut schema: RootSchema = serde_json:: from_str ( & raw_schema) . unwrap ( ) ;
16
17
// The upstream argo workflow API schema does not match with its API response.
17
18
// This is a temporary fix to match the API response.
You can’t perform that action at this time.
0 commit comments