mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Mark grpc data source timeouts as cancelled queries (#100573)
* Set up to reproduce issue locally
* add check for deadline exceeded
* Revert "Set up to reproduce issue locally"
This reverts commit d8d9b354ca
.
* Trigger build
---------
Co-authored-by: Will Browne <will.browne@grafana.com>
This commit is contained in:
parent
1c7a758127
commit
a69fac6e16
@ -35,7 +35,7 @@ func RequestStatusFromError(err error) RequestStatus {
|
||||
status = RequestStatusError
|
||||
if errors.Is(err, context.Canceled) {
|
||||
status = RequestStatusCancelled
|
||||
} else if s, ok := grpcstatus.FromError(err); ok && s.Code() == grpccodes.Canceled {
|
||||
} else if s, ok := grpcstatus.FromError(err); ok && s.Code() == grpccodes.Canceled || s.Code() == grpccodes.DeadlineExceeded {
|
||||
status = RequestStatusCancelled
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user