use fetch for nicer error messages