website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* These are mapped from DomainErrors by Mutations.
|
||||
*/
|
||||
|
||||
export type MutationError =
|
||||
export type MutationError =
|
||||
| 'userNotFound' // User doesn't exist
|
||||
| 'noPermission' // Insufficient permissions
|
||||
| 'invalidData' // Validation failed
|
||||
@@ -14,6 +14,7 @@ export type MutationError =
|
||||
| 'createFailed' // Create operation failed
|
||||
| 'networkError' // Network/communication error
|
||||
| 'serverError' // Generic server error
|
||||
| 'notImplemented' // Feature not implemented
|
||||
| 'unknown'; // Unknown error
|
||||
|
||||
// Helper to map DomainError to MutationError
|
||||
@@ -39,6 +40,9 @@ export function mapToMutationError(domainError: any): MutationError {
|
||||
case 'networkError':
|
||||
case 'NetworkError':
|
||||
return 'networkError';
|
||||
case 'notImplemented':
|
||||
case 'NotImplementedError':
|
||||
return 'notImplemented';
|
||||
default:
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export type DomainError =
|
||||
| { type: 'validation'; message: string }
|
||||
| { type: 'serverError'; message: string }
|
||||
| { type: 'networkError'; message: string }
|
||||
| { type: 'notImplemented'; message: string }
|
||||
| { type: 'unknown'; message: string };
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user