File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -718,6 +718,8 @@ fn dns_error(rcode: String, info_code: u16) -> ErrorCode {
718718 } )
719719}
720720
721+ // TODO: Remove this (and uses of it) once
722+ // https://github.com/spinframework/spin/issues/3274 has been addressed.
721723pub fn p2_to_p3_error_code ( code : p2_types:: ErrorCode ) -> p3_types:: ErrorCode {
722724 match code {
723725 p2_types:: ErrorCode :: DnsTimeout => p3_types:: ErrorCode :: DnsTimeout ,
@@ -818,6 +820,8 @@ pub fn p2_to_p3_error_code(code: p2_types::ErrorCode) -> p3_types::ErrorCode {
818820 }
819821}
820822
823+ // TODO: Remove this (and uses of it) once
824+ // https://github.com/spinframework/spin/issues/3274 has been addressed.
821825pub fn p3_to_p2_error_code ( code : p3_types:: ErrorCode ) -> p2_types:: ErrorCode {
822826 match code {
823827 p3_types:: ErrorCode :: DnsTimeout => p2_types:: ErrorCode :: DnsTimeout ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl HttpExecutor for SpinHttpExecutor {
3030 ) -> Result < Response < Body > > {
3131 let spin_http:: routes:: TriggerLookupKey :: Component ( component_id) = route_match. lookup_key ( )
3232 else {
33- anyhow :: bail! ( "INCONCEIVABLE" ) ;
33+ unreachable ! ( )
3434 } ;
3535
3636 tracing:: trace!( "Executing request using the Spin executor for component {component_id}" ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ impl HttpExecutor for WagiHttpExecutor<'_> {
2929 ) -> Result < Response < Body > > {
3030 let spin_http:: routes:: TriggerLookupKey :: Component ( component) = route_match. lookup_key ( )
3131 else {
32- anyhow :: bail! ( "INCONCEIVABLE" ) ;
32+ unreachable ! ( )
3333 } ;
3434
3535 tracing:: trace!(
You can’t perform that action at this time.
0 commit comments