You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary: While testing a feature we are working on, we found a few places where alert messages sent to the user don't contain the custom error message.
Steps to reproduce:
As a super user, open a book where you are not a book user
Go to Content tab and select Add new page
Add title and body and click "Save"
Behavior expected: Error message alert with text: "Something went wrong while attempting to save: You do not have permission to modify this book". Behavior observed: Error message alert with text : "Something went wrong while attempting to save: object Object"
if (!$this->user && $this->api_users->is_super()) $this->_output_error(StatusCodes::HTTP_UNAUTHORIZED, 'You do not have permission to modify this book');
The pattern that I see elsewhere for this kind of message reporting is message.responseJSON.error.message[0].value; which gets the message contents from the jqXHR response object, and I can submit that as a pr with the fixes for the other error message reporting bug if that looks good to you.
The text was updated successfully, but these errors were encountered:
Summary: While testing a feature we are working on, we found a few places where alert messages sent to the user don't contain the custom error message.
Steps to reproduce:
Behavior expected: Error message alert with text: "Something went wrong while attempting to save: You do not have permission to modify this book".
Behavior observed: Error message alert with text : "Something went wrong while attempting to save: object Object"
Message contents are here:
scalar/system/application/views/arbors/html5_RDFa/js/form-validation.js
Line 301 in a9165f1
scalar/system/application/controllers/api.php
Line 111 in a9165f1
The pattern that I see elsewhere for this kind of message reporting is
message.responseJSON.error.message[0].value;
which gets the message contents from the jqXHR response object, and I can submit that as a pr with the fixes for the other error message reporting bug if that looks good to you.The text was updated successfully, but these errors were encountered: