---
lang: en
title: 'API docs: repository.invalidpolymorphismerror'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.invalidpolymorphismerror.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [InvalidPolymorphismError](./repository.invalidpolymorphismerror.md)

## InvalidPolymorphismError class

<b>Signature:</b>

```typescript
export declare class InvalidPolymorphismError<Props extends object = {}> extends Error 
```
<b>Extends:</b> Error

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(typeName, discriminator, extraProperties)](./repository.invalidpolymorphismerror._constructor_.md) |  | Constructs a new instance of the <code>InvalidPolymorphismError</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [code](./repository.invalidpolymorphismerror.code.md) |  | string |  |


