Why are you creating setters and getters?
```python
class InvenioWebMessageError(Exception):

      """A generic error for WebMessage."""

    def __init__(self, message="InvenioWebMessageError", code=400):
        """Initialisation."""
        self.message = message
        self.code = code
```