Skip to content

File upload failure response not handled by the plugin #18

@bidex160

Description

@bidex160

Bug Report

Capacitor Version

6.20.9

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
@capacitor/ios: 7.4.3

Installed Dependencies:

@capacitor/core: 6.2.1
@capacitor/cli: 6.2.1
@capacitor/android: 6.2.1
@capacitor/ios: 6.2.1

[success] iOS looking great! 👌
[success] Android looking great! 👌

PASTE OUTPUT HERE

Error: HTTP error: 400 - HTTP error: 400
at returnResult (:956:32)
at win.androidBridge.onmessage (:931:21)

Platform(s)

Android

Current Behavior

Error: HTTP error: 400 - HTTP error: 400
at returnResult (:956:32)
at win.androidBridge.onmessage (:931:21)

Expected Behavior

the appropriate error message from server is not returned e.g

{
"status": false,
"errorCode": -1,
"error": {
"others": [
"Enter workshop date in",
"Enter duration",
"No task added"
]
}
}

for success responses it return the expected response from the api but returns the error in the case of failed responses. what is expected is to get the error response from the api

e.g error response from postman
{
"status": false,
"errorCode": -1,
"error": {
"others": [
"Enter workshop date in",
"Enter duration",
"No task added"
]
}
}

Code Reproduction

Other Technical Details

use the plugin to upload for a failed request

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions