---
lang: en
title: 'API docs: repository.invalidrelationerror'
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.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)

## InvalidRelationError class

<b>Signature:</b>

```typescript
export declare class InvalidRelationError<Props extends object = {}> extends Error 
```

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(reason, relationMeta, extraProperties)](./repository.invalidrelationerror._constructor_.md) |  | Constructs a new instance of the <code>InvalidRelationError</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [code](./repository.invalidrelationerror.code.md) |  | <code>string</code> |  |
|  [reason](./repository.invalidrelationerror.reason.md) |  | <code>string</code> |  |
|  [relationName](./repository.invalidrelationerror.relationname.md) |  | <code>string</code> |  |
|  [relationType](./repository.invalidrelationerror.relationtype.md) |  | <code>RelationType</code> |  |
|  [sourceModelName](./repository.invalidrelationerror.sourcemodelname.md) |  | <code>string</code> |  |


