sanity
Version:
Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches
7 lines (4 loc) • 327 B
text/typescript
import {isErrorWithDetails} from '../../error/types/isErrorWithDetails'
type ReleaseLimitError = {details: {type: 'releaseLimitExceededError'; limit: number}}
export const isReleaseLimitError = (error: unknown): error is ReleaseLimitError =>
isErrorWithDetails(error) && error.details?.type === 'releaseLimitExceededError'