The template display was broken in case of error. 'in_error_state is never defined it should be 'repository.in_error_state' instead. This was leading to some wrong field type display and not displaying the details about the error.