目录

Status Codes

HTTP Status Codes

Drive result codes are defined based on HTTP status codes, where the reason and description fields indicate the specific cause of a failure. Each result code described in the following table is the last four digits of the actual result code returned.

HTTP Status Code

Result Code

Description

Solution

200

-

Success.

-

204

-

Success.

-

206

-

Success.

-

201

-

Operation succeeded, but some file attributes failed to be set.

Modify the attribute based on the returned information.

302

-

Address redirected.

Visit the new address that is returned.

308

-

File not completely uploaded during a resumable upload session.

Resume file upload based on the returned information.

400

4001

Input parameter is missing.

Check whether the request parameters are correct based on the returned information.

4002

Parameter verification failed.

Check whether the request parameters are correct based on the returned information.

4003

Invalid parameter.

Check whether the request parameters are correct based on the returned information.

4004

Input parameter expired.

Obtain the parameter again and renew the request.

4005

Routing failed.

Verify that the request URL is correct.

4006

Unsupported characters.

Verify that the parameter does not contain unsupported characters.

4007

Invalid characters.

Verify that the parameter does not contain invalid characters.

4008

The parameter value length exceeds the limit.

Reduce the parameter value length.

4009

The parent directory does not exist.

Check the parent directory.

4910

Failed to convert the VUDID into the IMEI.

Verify that the VUDID is correct.

4909

The ID already exists.

Generate a new ID.

4908

The user key has expired.

Generate a new user key.

4907

Invalid user account.

Verify that the user ID is consistent with the authentication information.

4906

The parent directory is deleted and moved to the recycle bin.

Restore the parent directory from the recycle bin.

401

4011

User authentication failed.

Conduct user authentication again.

4012

The app is not authorized.

Authorize the app.

4014

Authorization canceled.

Obtain the authorization again.

4015

Sign-in failed.

Sign in again.

4016

Session expired.

Re-establish a session.

4017

Forcible sign-in to the account is required.

Sign in to the account again.

402

4020

Privilege escalation.

Verify that the user ID is consistent with the authentication information.

403

4031

Security policy being updated.

Wait until security policy update is complete.

4032

The service is not supported in the current country/region.

Verify that the HUAWEI ID comes from a country/region supported by HUAWEI Drive Kit.

4033

HUAWEI Drive user agreement not signed.

Direct the user to the page (https://cloud.huawei.com/) for signing the HUAWEI Drive user agreement.

4034

Restricted function.

Contact Huawei technical support.

4035

No permission.

Check whether the current app has been created in AppGallery Connect and the required services have been applied for it.

4036

Resource cannot be operated.

Verify that the permissions for operating the resource have been granted.

4037

Server error occurred during resumable file upload.

Start resumable upload again.

4038

An external service error occurred and cannot be rectified.

Contact Huawei technical support.

4039

Insufficient storage space.

Verify that the user's storage space is sufficient.

4931

Repeated file download.

Check the app logs for the reason why the file is repeatedly downloaded.

4932

Duplicate file or folder name.

Check whether a file or folder with the same name is already in the current folder. If so, prompt the user to enter another name.

4933

Services cannot be provided for the user.

Register a HUAWEI ID and enable Drive Kit.

4934

The number of files to download exceeds the upper limit.

Reduce the number of files to download.

4936

The number of folder levels exceeds the upper limit.

Decrease the number of folder levels.

4937

The number of historical versions exceeds the upper limit.

Update the file version.

4938

The file cannot be copied.

Verify that the file exists.

4939

The service has been disabled.

Enable the service.

4940

A file version conflict occurs.

Obtain the file version again.

4941

Identity verification failed.

Complete identity verification.

4946

The operation is not allowed.

-

4947

Parameter update is not allowed.

-

4948

Horizontal privilege escalation occurred.

-

4949

This operation cannot be performed on files in the recycle bin.

Restore files from the recycle bin and try again.

4950

The file name exceeds the upper limit.

Shorten the file name.

4951

Deletion is not allowed because there are backup records within the clearing time (clearTime).

Verify that there are no backup records within the clearing time (clearTime).

4952

The temporary key has expired.

Obtain a new key.

404

4041

File not found.

Verify that the file exists.

4042

Data exception occurred and data becomes unavailable.

Verify that the file exists.

4043

Subscription channel not found.

Verify that the channel exists.

4044

The thumbnail does not exist.

Verify that the thumbnail exists.

4046

Invalid temporary data.

Upload the file again.

4047

Entity data does not exist.

Verify that entity data exists.

409

4090

A version conflict occurred.

Obtain the file version again.

4091

Failed to obtain the lock.

Try again later.

410

4100

Cursor expired.

Obtain a new cursor.

4101

Temporary data has been cleared.

Obtain a new cursor.

412

4121

Cloud data has been updated.

Obtain the latest data again.

429

4291

Too many user requests.

Try again later.

4292

Too many app requests.

Try again later.

4293

The user requests flow control.

Try again later.

499

4001

The parent directory of the file does not exist.

Check the parent directory.

500

5001

Insufficient server resources.

Try again later.

5002

External service is unavailable.

Try again later.

5003

External service is busy.

Try again later.

5004

Database operation failed.

Try again later.

5005

Resource locked and cannot be operated temporarily.

Try again later.

5006

Temporary server error.

Try again later.

5007

Server being upgraded.

Try again later.

503

5008

The resource is in GC and cannot be operated.

Try again later.

5030

Abnormal service status.

Try again later.

5031

Flow control is performed on the addresses returned by the NSP.

Try again later.

504

5040

On-device retry is triggered.

Try again later.

If the error persists, submit a ticket online. Huawei will get back to you as soon as possible.

Result Code Example

{
    "error": {
        "code": 400,
        "description": "Parameter error",
        "errorDetail": [
            {
                "reason": "PARAM_INVALID",
                "domain": "global",
                "errorCode": "21004002",
                "description": "Parameter error"
            }
        ]
    }
}