Getting Hardfault when trigerring interrupt in a task

I guess your are using FreeRTOS API calls in your ISR(s), right ? Could you show the code ?
Did you verify that the priority and FreeRTOS are configured correctly ?
Did you enable configASSERT for development ? There are also assert checks in FreeRTOS catching wrong interrupt prios.
See the FreeRTOS docs (in case you’re using a Cortex-M MCU as I suppose) RTOS for ARM Cortex-M and mabe also this post Understanding priority levels of ISR and FreeRTOS APIs - #16 by aggarg containing a good and easy to understand explanation using interrupts/ISRs with FreeRTOS.