code: def errors(self,
                 errors: List[str],
                 code: Union[int, Tuple[int, str, str]] = HTTPStatus.BAD_REQUEST,
                 key: str = 'errors',
                 headers: Optional[Dict[str, str]] = None,
                 ):
          
          return jsonify({key: errors}), code, headers or {}
docs: Convenience method to return errors as json.
  
          :param errors: The list of errors.
          :param code: The HTTP status code.
          :param key: The key to return the errors under.
          :param headers: Any optional headers.