@@ -9,6 +9,7 @@ use solana_sdk::pubkey::Pubkey;
99use thiserror:: Error ;
1010use tracing:: error;
1111
12+ #[ allow( clippy:: large_enum_variant) ]
1213#[ derive( Error , Debug ) ]
1314pub enum ApiError {
1415 #[ error( "Rpc Error" ) ]
@@ -41,7 +42,10 @@ impl IntoResponse for ApiError {
4142 }
4243 ApiError :: ParseStakeDepositAuthorityError ( e) => {
4344 error ! ( "Parse StakePoolDepositStakeAuthority error: {e}" ) ;
44- ( StatusCode :: INTERNAL_SERVER_ERROR , "Pubkey StakePoolDepositStakeAuthority error" )
45+ (
46+ StatusCode :: INTERNAL_SERVER_ERROR ,
47+ "Pubkey StakePoolDepositStakeAuthority error" ,
48+ )
4549 }
4650 ApiError :: ParseStakePoolError ( e) => {
4751 error ! ( "Parse StakePool error: {e}" ) ;
@@ -53,9 +57,15 @@ impl IntoResponse for ApiError {
5357 }
5458 ApiError :: ParseValidatorListError ( e) => {
5559 error ! ( "Parse ValidatorList error: {e}" ) ;
56- ( StatusCode :: INTERNAL_SERVER_ERROR , "Pubkey ValidatorList error" )
60+ (
61+ StatusCode :: INTERNAL_SERVER_ERROR ,
62+ "Pubkey ValidatorList error" ,
63+ )
5764 }
58- ApiError :: InvalidStakeVoteAccount => ( StatusCode :: BAD_REQUEST , "Stake voter_pubkey is invalid or missing" ) ,
65+ ApiError :: InvalidStakeVoteAccount => (
66+ StatusCode :: BAD_REQUEST ,
67+ "Stake voter_pubkey is invalid or missing" ,
68+ ) ,
5969 ApiError :: InternalError => ( StatusCode :: INTERNAL_SERVER_ERROR , "Internal Server Error" ) ,
6070 } ;
6171 (
0 commit comments