better debug and 404 messages for api registration failures