{"record":{"id":"0ce4f54793cdef69","repo":"thephpleague/flysystem","slug":"move-command-returned-unexpected-status-code","errorCode":null,"errorMessage":"MOVE command returned unexpected status code: ","messagePattern":"MOVE command returned unexpected status code: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/WebDAV/WebDAVAdapter.php","lineNumber":359,"sourceCode":"        }\n\n        if ($this->manualMove) {\n            $this->manualMove($source, $destination);\n\n            return;\n        }\n\n        $this->createParentDirFor($destination);\n        $location = $this->encodePath($this->prefixer->prefixPath($source));\n        $newLocation = $this->encodePath($this->prefixer->prefixPath($destination));\n\n        try {\n            $response = $this->client->request('MOVE', $location, null, [\n                'Destination' => $this->client->getAbsoluteUrl($newLocation),\n            ]);\n\n            if ($response['statusCode'] < 200 || $response['statusCode'] >= 300) {\n                throw new RuntimeException('MOVE command returned unexpected status code: ' . $response['statusCode'] . \"\\n{$response['body']}\");\n            }\n        } catch (Throwable $e) {\n            throw UnableToMoveFile::fromLocationTo($source, $destination, $e);\n        }\n    }\n\n    private function manualMove(string $source, string $destination): void\n    {\n        try {\n            $handle = $this->readStream($source);\n            $this->writeStream($destination, $handle, new Config());\n            @fclose($handle);\n            $this->delete($source);\n        } catch (Throwable $exception) {\n            throw UnableToMoveFile::fromLocationTo($source, $destination, $exception);\n        }\n    }\n","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/thephpleague/flysystem/blob/b277b5dc3d56650b68904117124e79c851e12376/src/WebDAV/WebDAVAdapter.php#L341-L377","documentation":"Error \"MOVE command returned unexpected status code: \" thrown in thephpleague/flysystem.","triggerScenarios":"Thrown at src/WebDAV/WebDAVAdapter.php:359 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b277b5dc3d56650b68904117124e79c851e12376","analyzedAt":"2026-08-17T04:28:35.741Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}