File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -98,20 +98,20 @@ impl Operator {
98
98
99
99
pub async fn validate ( & self ) -> Result < ( ) , OperatorTypesError > {
100
100
// Check for valid URL in metadata_url
101
- let _ =
102
- Url :: parse ( & self . metadata_url ) . map_err ( |_| OperatorTypesError :: InvalidMetadataUrl ) ?;
101
+ Url :: parse ( & self . metadata_url ) . map_err ( |_| OperatorTypesError :: InvalidMetadataUrl ) ?;
103
102
104
103
// Check if metadata is valid
105
104
let body = get_url_content ( & self . metadata_url )
106
105
. await
107
106
. map_err ( |_| OperatorTypesError :: MetadataNotFound ) ?;
107
+
108
108
let operator_metadata: OperatorMetadata =
109
109
serde_json:: from_str ( & body) . map_err ( |_| OperatorTypesError :: MetadataParseError ) ?;
110
110
111
111
operator_metadata
112
112
. validate ( )
113
113
. await
114
- . map_err ( |e| OperatorTypesError :: MetadataValidationError ( e ) )
114
+ . map_err ( OperatorTypesError :: MetadataValidationError )
115
115
}
116
116
117
117
pub fn operator_id_from_key_pair (
You can’t perform that action at this time.
0 commit comments