File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1+ use htsget_config:: types:: HtsGetError as HtsGetSearchError ;
12use http:: StatusCode ;
23use http:: header:: { InvalidHeaderName , InvalidHeaderValue } ;
34use serde:: { Deserialize , Serialize } ;
45use thiserror:: Error ;
56
6- use crate :: HtsGetError :: InternalError ;
7- use htsget_config:: types:: HtsGetError as HtsGetSearchError ;
8-
97pub type Result < T > = core:: result:: Result < T , HtsGetError > ;
108
119/// An error type that describes the errors specified in the
@@ -105,7 +103,7 @@ impl From<InvalidHeaderValue> for HtsGetError {
105103impl From < reqwest_middleware:: Error > for HtsGetError {
106104 fn from ( err : reqwest_middleware:: Error ) -> Self {
107105 match err {
108- reqwest_middleware:: Error :: Middleware ( err) => InternalError ( err. to_string ( ) ) ,
106+ reqwest_middleware:: Error :: Middleware ( err) => HtsGetError :: InternalError ( err. to_string ( ) ) ,
109107 reqwest_middleware:: Error :: Reqwest ( err) => err
110108 . status ( )
111109 . map ( |status| match status {
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ impl Auth {
9393 . http_client ( )
9494 . map_err ( |err| HtsGetError :: InternalError ( format ! ( "failed to fetch data from {url}: {err}" ) ) ) ?
9595 . get ( url)
96- . headers ( headers. clone ( ) )
96+ . headers ( headers)
9797 . send ( )
9898 . await ?;
9999 trace ! ( "response: {:?}" , response) ;
@@ -117,7 +117,7 @@ impl Auth {
117117 }
118118 }
119119
120- /// Get a decoding key form the JWKS url.
120+ /// Get a decoding key from the JWKS url.
121121 pub async fn decode_jwks ( & mut self , jwks_url : & Uri , token : & str ) -> HtsGetResult < DecodingKey > {
122122 // Decode header and get the key id.
123123 let header = decode_header ( token) ?;
You can’t perform that action at this time.
0 commit comments