triggr/
errors.rs

1use anchor_lang::prelude::*;
2
3#[error_code]
4pub enum TriggrError {
5    #[msg("Invalid condition")]
6    ConditionNotFound,
7
8    #[msg("Time condition failed")]
9    InvalidTimeCondition,
10
11    #[msg("Price condition failed")]
12    InvalidPriceCondition,
13
14    #[msg("Invalid price feed")]
15    InvalidPriceFeed,
16
17    #[msg("Invalid recurrence pattern")]
18    UnsupportedRecurrencePattern,
19
20    #[msg("Trigger not active")]
21    TriggerNotActive,
22
23    #[msg("LUT already exists")]
24    LookUpTableAlreadyExists,
25
26    #[msg("Attempted to populate an task that is already ready")]
27    InvalidPopulate,
28
29    #[msg("An instruction has expired")]
30    ExpiredInstruction,
31
32    #[msg("Expiration slot passed")]
33    ExpirationSlotPassed,
34}