# RecipeAddException
> Thrown when a custom recipe fails to be added.
`gg.lode.observerapi.api.exception`
---
## Signature
```java
public class RecipeAddException extends Exception
```
## Extends
- `Exception`
---
## Nested Types
### Type
```java
public enum Type
```
| Constant | Description |
|----------|-------------|
| `INVALID_NAMESPACED_KEY` | The provided namespaced key is invalid |
| `ID_ALREADY_USED` | A recipe with this ID already exists |
| `SERVER_REFUSED_RECIPE` | The server rejected the recipe registration |
---
## Constructor
```java
public RecipeAddException(String message, Type type)
```
| Parameter | Type | Description |
|-----------|------|-------------|
| `message` | `String` | The error message |
| `type` | `Type` | The type of failure |
---
## Methods
### type
```java
public Type type()
```
**Returns:** `RecipeAddException.Type` - the type of failure that caused this exception
---
## Related Pages
- [[ICustomRecipesManager]]