Add error options for rendering to return errors on failure (#48864)
This commit is contained in:
@@ -41,6 +41,7 @@ func getRequestTimeout(opt TimeoutOpts) time.Duration {
|
||||
type Opts struct {
|
||||
TimeoutOpts
|
||||
AuthOpts
|
||||
ErrorOpts
|
||||
Width int
|
||||
Height int
|
||||
Path string
|
||||
@@ -52,6 +53,15 @@ type Opts struct {
|
||||
Theme models.Theme
|
||||
}
|
||||
|
||||
type ErrorOpts struct {
|
||||
// ErrorConcurrentLimitReached returns an ErrConcurrentLimitReached
|
||||
// error instead of a rendering limit exceeded image.
|
||||
ErrorConcurrentLimitReached bool
|
||||
// ErrorRenderUnavailable returns an ErrRunderUnavailable error
|
||||
// instead of a rendering unavailable image.
|
||||
ErrorRenderUnavailable bool
|
||||
}
|
||||
|
||||
type CSVOpts struct {
|
||||
TimeoutOpts
|
||||
AuthOpts
|
||||
|
||||
Reference in New Issue
Block a user