Better error handling for site extension api