MCPcopy
hub / github.com/dropbox/godropbox / RootDropboxError

Function RootDropboxError

errors/errors.go:237–250  ·  view source on GitHub ↗

Return the lowest-level DropboxError. This can be used when reporting the stack of the original exception to try and get the most relevant stack instead of the highest level stack.

(dbxErr DropboxError)

Source from the content-addressed store, hash-verified

235// reporting the stack of the original exception to try and get the most
236// relevant stack instead of the highest level stack.
237func RootDropboxError(dbxErr DropboxError) DropboxError {
238 for {
239 innerErr := dbxErr.Unwrap()
240 if innerErr == nil {
241 break
242 }
243 innerDBXErr, ok := innerErr.(DropboxError)
244 if !ok {
245 break
246 }
247 dbxErr = innerDBXErr
248 }
249 return dbxErr
250}
251
252// Perform a deep check, unwrapping errors as much as possilbe and
253// comparing the string version of the error.

Callers 1

TestRootErrorsFunction · 0.85

Calls 1

UnwrapMethod · 0.65

Tested by 1

TestRootErrorsFunction · 0.68