Merge branch '4.x' of github.com:verdaccio/verdaccio into 4.x

This commit is contained in:
Juan Picado @jotadeveloper 2018-10-08 20:29:21 +02:00
commit e3772227a6
No known key found for this signature in database
GPG Key ID: 18AC54485952D158
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
import _ from 'lodash';
import { allow } from '../../middleware';
import { convertDistRemoteToLocalTarballUrls, getVersion, ErrorCode } from '../../../lib/utils';
import { HEADERS, DIST_TAGS } from '../../../lib/constants';
import { HEADERS, DIST_TAGS, API_ERROR } from '../../../lib/constants';
import type { Router } from 'express';
import type { Config } from '@verdaccio/types';
import type { IAuth, $ResponseExtend, $RequestExtend, $NextFunctionVer, IStorageHandler } from '../../../../types';
@ -40,7 +40,7 @@ export default function(route: Router, auth: IAuth, storage: IStorageHandler, co
}
}
}
return next(ErrorCode.getNotFound(`version not found: ${req.params.version}`));
return next(ErrorCode.getNotFound(`${API_ERROR.VERSION_NOT_EXIST}: ${req.params.version}`));
};
storage.getPackage({