Would be useful to add more descriptive error messages.