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

Fix/234 callback exception #239

Merged
merged 5 commits into from
Oct 16, 2017
Merged

Conversation

ibelar
Copy link
Contributor

@ibelar ibelar commented Oct 16, 2017

Fix callback error display when sent by App::caughtException($exception)

The ApiService::OnFailure(response) method will better handle error response when it contains only html, as output by App::caughtException($exception).

  • The method now check if property success if part of the response, which is normally the case when using json output with error: {success: false, message: 'error msg'};
  • if not then, try to catch body content of the response string, which is normally the case when App::caugthException is returning the error;
  • finally simply display the error in a alert box has last resort.

Note: atk4Js.min will need to be recompile.

@codecov-io
Copy link

codecov-io commented Oct 16, 2017

Codecov Report

Merging #239 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #239   +/-   ##
==========================================
  Coverage      73.69%   73.69%           
  Complexity      1051     1051           
==========================================
  Files             58       58           
  Lines           2513     2513           
==========================================
  Hits            1852     1852           
  Misses           661      661

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d8b544...d3e1963. Read the comment docs.

@romaninsh romaninsh merged commit d3e1963 into atk4:develop Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants