Skip to content
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

Displaying ajax errors #1012

Closed
5 of 6 tasks
lamoglia opened this issue Jul 13, 2017 · 0 comments
Closed
5 of 6 tasks

Displaying ajax errors #1012

lamoglia opened this issue Jul 13, 2017 · 0 comments

Comments

@lamoglia
Copy link
Contributor

lamoglia commented Jul 13, 2017

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of bootstrap-fileinput.
  • This is not an usage question. I confirm having read the plugin documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. I'm starting an ansyc uploader with showAjaxErrorDetails = true (the default)
  2. When some server-side validation fails i send the following response:

{
"error":"Imagem deve estar na proporção 16:9.",
"initialPreview":[],
"initialPreviewConfig":[],
"initialPreviewThumbTags":[],
"append":true
}

Expected behavior and actual behavior

When I follow those steps, the error message at "error" tag is displayed like this:
screenshot from 2017-07-13 17 02 36

I was expecting...

screenshot from 2017-07-13 17 02 36

This line with a single dot don't seems very adequate. I know that the white box inside the alert (first image) seems to be appropriate to display a stack trace (as stated here), but not to show a single error message.

Looking trough the code, I found out that this is being built in the _parseError fucniton

I've changed the function so it behaves as the second picture, but I wish to know if there is some way of doing it without changing the source.

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants