Prajithp/Dancer-Plugin-Auth-Facebook — pull request #4 by garu (2014-12-19 16:16:05+00:00)
Title: improved error handling

Hi again!

At one point I was receiving a lot of timeout errors from Facebook which sadly don't parse as JSON, effectively raising a fatal exception whenever as_hash was called. This patch captures such exceptions, sends proper error messages and fails gracefully whenever Facebook doesn't do what we want.

Note: If it were *my* code I would use Try::Tiny instead of plain eval {} but I'm not sure how you feel about adding another dependency.

I'm already using this code in production, so hopefully it reaches CPAN soon!

Cheers! And thanks again for this module!