code: func (h *Handler) GetObjectByHash(
  	tkn, objectType, hash string) (json.RawMessage, error) {
  	logger := h.logger.Add("method", "GetObjectByHash",
  		"type", objectType, "hash", hash)
  
  	if !h.token.Check(tkn) {
  		logger.Warn("access denied")
  		return nil, ErrAccessDenied
  	}
  
  	table, ok := objectWithHashTypes[objectType]
  	if !ok {
  		logger.Warn(ErrBadObjectType.Error())
  		return nil, ErrBadObjectType
  	}
  
  	obj, err := h.db.FindOneFrom(table, "hash", hash)
  	if err != nil {
  		logger.Error(err.Error())
  		return nil, ErrObjectNotFound
  	}
  
  	raw, err := json.Marshal(obj)
  	if err != nil {
  		logger.Error(err.Error())
  		return nil, ErrInternal
  	}
  
  	return raw, nil
  }
docs: // GetObjectByHash finds object in a database by hash,
  // then returns an object on raw JSON format.