Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Commit

Permalink
if I have custom pages for 404 or 500 as well as giving http status c…
Browse files Browse the repository at this point in the history
…ode I still want to show the result of my custom page that can be handle page:fail with one more parameter
  • Loading branch information
cfiorini committed Mar 30, 2014
1 parent 83fa569 commit 9ebb417
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/assets/javascripts/_request_manager.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RequestManager
self._html_loaded($target, data, status, xhr)
).fail(
(xhr, status, error) ->
self._fail($target, status, state, error, xhr.status)
self._fail($target, status, state, error, xhr.status, xhr.responseText)
).always(
(data_or_xhr, status, xhr_or_error)->
self._always($target, status, state)
Expand Down Expand Up @@ -88,9 +88,9 @@ class RequestManager
@_done($target, status, state, response.content())
)

_fail: ($target, status, state, error, code) ->
_fail: ($target, status, state, error, code, data) ->
$(document).trigger('page:fail'
[$target, status, decodeURI(state.url), error, code]
[$target, status, decodeURI(state.url), error, code, data]
)

_always: ($target, status, state) ->
Expand Down

0 comments on commit 9ebb417

Please sign in to comment.