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

Function dropboxAPIEndpointFromMessage

cmd/output.go:693–709  ·  view source on GitHub ↗
(message string)

Source from the content-addressed store, hash-verified

691}
692
693func dropboxAPIEndpointFromMessage(message string) (string, bool) {
694 const prefix = `Error in call to API function "`
695 idx := strings.Index(message, prefix)
696 if idx < 0 {
697 return "", false
698 }
699 start := idx + len(prefix)
700 end := strings.Index(message[start:], `"`)
701 if end < 0 {
702 return "", false
703 }
704 end += start
705 if start == end {
706 return "", false
707 }
708 return message[start:end], true
709}
710
711func isDropboxAPISummary(message string) bool {
712 if message == "" || strings.ContainsAny(message, " \t\r\n\"") || !strings.Contains(message, "/") {

Callers 1

jsonErrorDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected