you fixed half of the CS issue...
```
new CAPIError(
    "An error occurred during request authentication.",
    {request: nextRequest}
);
```
(the same issue is repeated several times in this diff)