|
|
@@ -74,7 +74,7 @@ class UrlBuilder {
|
|
|
*/
|
|
|
private static getEnumUrl (enumType?: string): string {
|
|
|
if (typeof enumType === 'undefined') {
|
|
|
- throw new TypeError('enumType must be defined')
|
|
|
+ throw new Error('enumType must be defined')
|
|
|
}
|
|
|
return UrlBuilder.concat(UrlBuilder.ROOT, 'enum', enumType)
|
|
|
}
|
|
|
@@ -90,14 +90,14 @@ class UrlBuilder {
|
|
|
*/
|
|
|
private static getModelUrl (model?: typeof Model, rootModel?: typeof Model, rootId?: number): string {
|
|
|
if (typeof model === 'undefined') {
|
|
|
- throw new TypeError('model must be defined')
|
|
|
+ throw new Error('model must be defined')
|
|
|
}
|
|
|
|
|
|
const entity = repositoryHelper.getEntity(model)
|
|
|
|
|
|
if (typeof rootModel !== 'undefined') {
|
|
|
if (typeof rootId === 'undefined') {
|
|
|
- throw new TypeError('Root ID must be defined')
|
|
|
+ throw new Error('Root ID must be defined')
|
|
|
}
|
|
|
|
|
|
const rootUrl = UrlBuilder.getModelUrl(rootModel) as string
|