code: func getStatus(err error) int {
  	// no error
  	if err == nil {
  		return 200
  	}
  
  	// try get errors.Error
  	if e, ok := err.(*errors.Error); ok {
  		return int(e.Code)
  	}
  
  	// try parse marshalled error
  	if e := errors.Parse(err.Error()); e.Code > 0 {
  		return int(e.Code)
  	}
  
  	// could not parse, 500
  	return 500
  }
docs: // getStatus returns a status code from the error