Open
Description
Steps to reproduce:
- Run the PHP server in such a way that it cannot communicate with MySQL.
- Fire up the browser to
http://localhost/
- Press the "Upload" button.
- You will get a message such as this one:
So, JavaScript is behaving as if PHP returned no error message, but it is supposed to return an error message. Here is the PHP code which returns the message Connection to the database failed
: https://github.com/FlatAssembler/PicoBlaze_Simulator_in_JS/blob/3e9f91810c8614db7b9a305ba5c25e58f57f1adf/db.php#L26C1-L27C75
And, indeed, the PHP server in the terminal claims to return the error 500, rather than 200 OK
:
And here is how JavaScript checks whether the server returned 200 OK
:
https://github.com/FlatAssembler/PicoBlaze_Simulator_in_JS/blob/3e9f91810c8614db7b9a305ba5c25e58f57f1adf/sharer.js#L14C1-L22C1
I have no idea where the problem might be.
Metadata
Metadata
Assignees
Labels
No labels