Better error for invalid origin