passed error code to view must be integer