]> BookStack Code Mirror - bookstack/commit
Added better drawing load failure handling
authorDan Brown <redacted>
Thu, 26 Jan 2023 12:16:23 +0000 (12:16 +0000)
committerDan Brown <redacted>
Thu, 26 Jan 2023 12:18:33 +0000 (12:18 +0000)
commit48df8725d82cac821ee935498c811509c96e63c2
tree9b7c2025673a42428e4ae42315b5a285f52c7e13
parent25bdd714771a269d369e1702d2b6d2e6becbaf02
Added better drawing load failure handling

Failure of loading drawings will now close the drawing view and show an
error message, hinting at file or permission issues, instead of leaving
the user facing a continuosly loading interface.

Adds test to cover.

This also updates errors from our HTTP service to be wrapped in a custom
error type for better identification and so the error is an actual
javascript error. Should be object compatible.

Related to #3955.
app/Http/Controllers/Images/DrawioImageController.php
resources/js/services/drawio.js
resources/js/services/events.js
resources/js/services/http.js
resources/js/wysiwyg/plugin-drawio.js
resources/lang/en/errors.php
tests/Uploads/DrawioTest.php