Editing pg_hba.conf feels risky, because a typo can lock people out at the next reload. PostgreSQL gives you a way to check the file before you reload.
SELECT line_number, error
FROM pg_hba_file_rules
WHERE error IS NOT NULL;
The view turns the file into rows: rule_number, type, database, user_name, address, auth_method and more. The rule number is the order in which rules are considered when someone logs in, so the first matching line wins. A line that could not be processed has only line_number and error filled in, and a NULL rule_number.
The useful part is that the view reports on the current contents of the file, not on what the server last loaded. So the routine is: edit the file, run the query, fix anything it reports, and only then run SELECT pg_reload_conf();.
Two things to know. By default only superusers can read the view. And because it reads the file, it can differ from the rules the server is using right now, until you reload. Checking the view does not apply anything.
Further reading: pg_hba_file_rules