Update to returning a custom error