JSON error responses for Rails APIs