Converts the error response into a JSON object.
@override Map<String, dynamic> toJson() { return {'status': status, 'error': error, 'message': message}; }