mirror of
https://github.com/langgenius/dify.git
synced 2026-09-07 18:36:02 +08:00
29 lines
686 B
TypeScript
29 lines
686 B
TypeScript
import type { DocumentUploadIssue } from '../../upload/policy'
|
|
|
|
export const DOCUMENT_STAGING_REQUEST_TIMEOUT = 30_000
|
|
|
|
export class DocumentStagingCanceledError extends Error {
|
|
constructor() {
|
|
super('Document staging was canceled')
|
|
this.name = 'DocumentStagingCanceledError'
|
|
}
|
|
}
|
|
|
|
export class DocumentStagingTimeoutError extends Error {
|
|
constructor() {
|
|
super('Document staging timed out')
|
|
this.name = 'DocumentStagingTimeoutError'
|
|
}
|
|
}
|
|
|
|
type UploadApiExclusionReason =
|
|
| 'batchLimit'
|
|
| 'countLimit'
|
|
| 'fileSize'
|
|
| 'fileType'
|
|
| 'processing'
|
|
| 'quota'
|
|
| 'target'
|
|
|
|
export type UploadExclusionReasonKey = DocumentUploadIssue | UploadApiExclusionReason
|