Added some basic scaffolding for returning errors.