[mod] log api error handling