Closed boddumanohar closed 1 year ago
at the moment, when I try to upload a duplicate file in silent mode, I get this error
➜ zbox upload --allocation 97f3040ccf62462b2c680325b63a0a2c850fd216fe4ec7694ef4c4ea6f0b9e53 --localpath ./go.sum --remotepath /go.sum --silent 0 / 54665 [--------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s Error in file operation: consensus_not_met: Upload failed. Required consensus atleast 2, got 0 Upload failed. consensus_not_met: Upload failed. Required consensus atleast 2, got 0
the error shown here is not clean as to why the actual upload failed. The actual failure is because of File at path already exists because I am trying to upload a file to the same path
File at path already exists
zbox upload --allocation 97f3040ccf62462b2c680325b63a0a2c850fd216fe4ec7694ef4c4ea6f0b9e53 --localpath ./go.sum --remotepath /go.sum 0chain-core-sdk [INFO] 2022/11/19 11:20:32.454693 wallet_base.go:262: ******* Wallet SDK Version:v1.8.8-8-g3c6d3d6c ******* (SetLogFile) 0box-sdk [INFO] 2022/11/19 11:20:32.456379 sdk.go:73: ******* Storage SDK Version: v1.8.8-8-g3c6d3d6c ******* 0chain-core-sdk [INFO] 2022/11/19 11:20:33.478437 transaction_base.go:138: ******* Wallet SDK Version:v1.8.8-8-g3c6d3d6c ******* (InitZCNSDK) 0box-sdk [DEBUG] 2022/11/19 11:20:35.865091 networkworker.go:105: Get network result:{"miners":["https://dev.0chain.net/miner03","https://dev.0chain.net/miner02","https://dev.0chain.net/miner01"],"sharders":["https://dev.0chain.net/sharder01","https://dev.0chain.net/sharder02"]} 0 / 54665 [-----------------------------------------------------------------------------------------------------------------------------------------] 0.00%0box-sdk [ERROR] 2022/11/19 11:20:36.251014 chunked_upload_blobber.go:127: https://dev.0chain.net/blobber02 Upload error response: 400err message: {"code":"duplicate_file","error":"duplicate_file: File at path already exists"} 0box-sdk [ERROR] 2022/11/19 11:20:36.251511 chunked_upload.go:592: error during sendUploadRequestbad request: {"code":"duplicate_file","error":"duplicate_file: File at path already exists"} 0box-sdk [ERROR] 2022/11/19 11:20:36.286424 chunked_upload_blobber.go:127: https://dev.0chain.net/blobber04 Upload error response: 400err message: {"code":"duplicate_file","error":"duplicate_file: File at path already exists"} 0box-sdk [ERROR] 2022/11/19 11:20:36.286595 chunked_upload.go:592: error during sendUploadRequestbad request: {"code":"duplicate_file","error":"duplicate_file: File at path already exists"} 0 / 54665 [--------------------------------------------------------------------------------------------------------------------------------------] 0.00% 0s Error in file operation: consensus_not_met: Upload failed. Required consensus atleast 2, got 0 Upload failed. consensus_not_met: Upload failed. Required consensus atleast 2, got 0
Expected:
the error should be something like this:
Upload failed. duplicate_file: File at path already exists
When uploading a duplicate file the error shown is: Upload failed. invalid_path: Path should be valid and absolute
Upload failed. invalid_path: Path should be valid and absolute
The error message is what is expected and not related to consensus.
https://github.com/0chain/gosdk/pull/803
at the moment, when I try to upload a duplicate file in silent mode, I get this error
the error shown here is not clean as to why the actual upload failed. The actual failure is because of
File at path already exists
because I am trying to upload a file to the same pathExpected:
the error should be something like this: