File size: 404 Bytes
6a7089a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package bridge

import "fmt"

// TabLimitError is returned when a new tab cannot be created because
// the configured limit has been reached and the eviction policy is "reject".
// HTTP handlers should map this to 429 Too Many Requests.
type TabLimitError struct {
	Current int
	Max     int
}

func (e *TabLimitError) Error() string {
	return fmt.Sprintf("tab limit reached (%d/%d)", e.Current, e.Max)
}