Skip to content

GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.

427 B
Raw Blame
package error

import "net/http"

type ValidationError string

func (err ValidationError) Error() string {
	return string(err)
}

// ErrCode will return the error code based on the error data type
func (err ValidationError) ErrCode() string {
	return "VALIDATION_ERROR"
}

// StatusCode will return the HTTP status code based on the error data type
func (err ValidationError) StatusCode() int {
	return http.StatusBadRequest
}