Can you make this return an error instead of a string?