Error: Call to undefined method Error::get(): Call to a member function getParams() on null