Just for the sake of completeness...here is my solution:
//Provide own implementation of liftajax.js
LiftRules.renderAjaxScript = (session : LiftSession) => MyScriptRenderer.ajaxScript
//Add some LiftRules
MyLiftRules.ajaxTimeoutFailure = {
Full(() => JsCmds.Alert("Timeout happened"))
}
MyLiftRules.ajaxSpecificFailure = List(
(500, () => JsCmds.Alert("Error 500")),
(404, () => JsCmds.Alert("Page not found"))
)
See a working example on github:
https://github.com/dhobi/liftajaxDaniel