if let Some(source_err) = err.source() {
if source_err.is::<RateLimited>() {
return RateLimited::new().into_response();
}
if source_err.is::<Elapsed>() {
return Elapsed::new().into_response();
}
}
if err.is::<RateLimited>() {
return RateLimited::new().into_response();
}
if err.is::<Elapsed>() {
return Elapsed::new().into_response();
}
main_router should be checked that if will also never return an error in itself therefore returning a non-graphql error. I don't think that it does, but this needs valdiation.
In https://github.com/apollographql/router/blob/dev/apollo-router/src/axum_factory/axum_http_server_factory.rs#L666-L681 we are returning non-graphql errors. This should never be the case inside
handle_graphql
.main_router
should be checked that if will also never return an error in itself therefore returning a non-graphql error. I don't think that it does, but this needs valdiation.