fix(rest) config: sendError -> main.sendError