Inject container into template controller on error