---
lang: en
title: 'API docs: repository.invalidrelationerror._constructor_'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.invalidrelationerror._constructor_.html
---

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [InvalidRelationError](./repository.invalidrelationerror.md) &gt; [(constructor)](./repository.invalidrelationerror._constructor_.md)

## InvalidRelationError.(constructor)

Constructs a new instance of the `InvalidRelationError` class

<b>Signature:</b>

```typescript
constructor(reason: string, relationMeta: RelationMetadata, extraProperties?: Props);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  reason | <code>string</code> |  |
|  relationMeta | <code>RelationMetadata</code> |  |
|  extraProperties | <code>Props</code> |  |


