philopon / helics

New Relic® agent SDK wrapper for Haskell
MIT License
13 stars 6 forks source link

Allow manually registering errors. #3

Closed iand675 closed 9 years ago

iand675 commented 9 years ago

It looks like the only way errors are currently registered is if there is an uncaught exception in a transaction. I would like to be able to create errors for other reasons (such as 4xx/5xx status codes, etc.), and probably provide custom details about the error.

Also, thanks for creating helics! It's very useful!

philopon commented 9 years ago

Oops! It's my mistake. I'll export noticeError function from helics.

noticeError :: TransactionError -> TransactionId -> IO ()

Thanks, too. Your feedback is very useful:smile:

philopon commented 9 years ago

Okey, I released v0.4.0. I added noticeError, setError, and clearError. And added dummyHelics middleware. It add dummy TransactionId to Request. Maybe, it also help you. Enjoy!:smile: