MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / normalizeContainerFileError

Function normalizeContainerFileError

agent/app/service/container.go:1476–1485  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

1474}
1475
1476func normalizeContainerFileError(err error) error {
1477 if err == nil {
1478 return nil
1479 }
1480 message := strings.ToLower(err.Error())
1481 if strings.Contains(message, "no such file or directory") || strings.Contains(message, "not found") {
1482 return buserr.New("ErrPathNotFound")
1483 }
1484 return err
1485}
1486
1487func runContainerCommand(cli *client.Client, containerID string, command []string) (string, error) {
1488 raw, err := runContainerCommandRaw(cli, containerID, command)

Callers 4

ListContainerFilesMethod · 0.85
GetContainerFileSizeMethod · 0.85
DownloadContainerFileMethod · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected