add error handling in middleware
bump to v0.0.3