Implement events, try to return the correct error message in all cases