Can I use one of 40 pin as a interrupt source

I want to use some of 40 PINs as a external interrupt source ,for example , connect a rotary encoder. But it always report error when register irq. Even i use mraa-gpio monitor pin , every pin reports error. Is there anyone can help