Error handing and responding to /def/ routes