isConnectionError returns true if the error is a connection-level error (i.e., not a server-side execution error indicated by TSStatus).
(err error)
| 79 | // isConnectionError returns true if the error is a connection-level error |
| 80 | // (i.e., not a server-side execution error indicated by TSStatus). |
| 81 | func isConnectionError(err error) bool { |
| 82 | if err == nil { |
| 83 | return false |
| 84 | } |
| 85 | var exeErr *ExecutionError |
| 86 | if errors.As(err, &exeErr) { |
| 87 | return false |
| 88 | } |
| 89 | var batchErr *BatchError |
| 90 | if errors.As(err, &batchErr) { |
| 91 | return false |
| 92 | } |
| 93 | return true |
| 94 | } |
| 95 | |
| 96 | // Insert inserts a Tablet into the database. |
| 97 | // |
no outgoing calls
no test coverage detected
searching dependent graphs…