[coap] Bugfix: CoAP not sending 4.04 when URI handler is not found (#8297)
[coap] Bugfix: CoAP not sending 4.04 when URI handler is not found (#8297)

Update CoAP base handler to correctly detect when a handler is not
found and send a 4.04 response.

Prior to this change, the error code would be overridden in the case
where a URI handler was not found to kErrorNone. This meant that when
the exit code was reached, no 4.04 message was generated. This fixes
the logical flow to ensure the error message is sent on the link.
srickardti/openthread,jwhui/openthread,jwhui/openthread,srickardti/openthread,openthread/openthread,openthread/openthread,openthread/openthread,jwhui/openthread,srickardti/openthread,jwhui/openthread,srickardti/openthread,openthread/openthread