-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPLOADED event fires off when the responseCode is 4xx #225
Comments
Hello @nvahalik, On which platform are you having this problem? Regards, |
Android seems to be the only one exhibiting the issue.
…On 4 May 2022, at 1:51, Sk Heerah Zafir wrote:
Hello @nvahalik,
On which platform are you receiving this problem?
Regards,
Zafir.
--
Reply to this email directly or view it on GitHub:
#225 (comment)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
I think this is expected. You should check the status code on your side. You will only get a failure if the request did not went through. |
@ombr This makes no sense, though. Any response >= 400 is an error. A 4xx is a client error and a 5xx is a server error. This is a bug in the plugin. |
@nvahalik I understand this is not intuitive. This library was created from this library and was following the same principle (at that time) gotev/android-upload-service#259 (you should check the issue). You are more than welcome to submit a pull-request for this. One thing to keep in mind is that we might want to save the response even if the status code is > 400 as we might want to use it to better understand the error. Thanks. Luc |
Set the error flag based on the success of the request.
For anyone coming here and seeing this, I've fixed this (along with a few other issues) in our version of the plugin: https://github.com/1stphorm/cordova-plugin-background-upload The fix is actually very simple. Just use |
We are getting these when doing an upload:
This should be error, but instead the
state
isUPLOADED
.The text was updated successfully, but these errors were encountered: