MCPcopy Create free account
hub / github.com/dropbox/dbxcli / dropboxAuthAPIErrorCode

Function dropboxAuthAPIErrorCode

cmd/output.go:599–615  ·  view source on GitHub ↗
(authErr *dropboxauth.AuthError)

Source from the content-addressed store, hash-verified

597}
598
599func dropboxAuthAPIErrorCode(authErr *dropboxauth.AuthError) string {
600 if authErr == nil {
601 return jsonErrorCodeDropboxAPIError
602 }
603 switch authErr.Tag {
604 case dropboxauth.AuthErrorInvalidAccessToken, dropboxauth.AuthErrorExpiredAccessToken:
605 return jsonErrorCodeAuthRequired
606 case dropboxauth.AuthErrorInvalidSelectUser,
607 dropboxauth.AuthErrorInvalidSelectAdmin,
608 dropboxauth.AuthErrorUserSuspended,
609 dropboxauth.AuthErrorMissingScope,
610 dropboxauth.AuthErrorRouteAccessDenied:
611 return jsonErrorCodePermissionDenied
612 default:
613 return jsonErrorCodeDropboxAPIError
614 }
615}
616
617func dropboxAPIErrorSummary(err error) (string, bool) {
618 for err != nil {

Callers 1

dropboxAPIJSONErrorCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected