Final direct BadRequest removals

This commit is contained in:
Tom Moor
2018-02-24 20:52:56 -08:00
parent f3c7fb8bc6
commit f8bdadfd9a
4 changed files with 15 additions and 14 deletions

View File

@ -1,6 +1,6 @@
// @flow
import httpErrors from 'http-errors';
import querystring from 'querystring';
import { InvalidRequestError } from '../../errors';
import { type Context } from 'koa';
export default function pagination(options?: Object) {
@ -24,7 +24,7 @@ export default function pagination(options?: Object) {
offset = isNaN(offset) ? 0 : offset;
if (limit > opts.maxLimit) {
throw httpErrors.BadRequest(
throw new InvalidRequestError(
`Pagination limit is too large (max ${opts.maxLimit})`
);
}