Error: Call to undefined method Error::get(): [] operator not supported for strings