fix: allow for backward compatible errors (#25640)

This commit is contained in:
Elizabeth Thompson
2023-10-27 11:04:33 -07:00
committed by GitHub
parent bda43ac0f6
commit ed14f36c55
5 changed files with 115 additions and 91 deletions

View File

@@ -107,12 +107,3 @@ export type ErrorMessageComponentProps<ExtraType = Record<string, any> | null> =
export type ErrorMessageComponent =
React.ComponentType<ErrorMessageComponentProps>;
/* Generic error to be returned when the backend returns an error response that is not
* SIP-41 compliant. */
export const genericSupersetError = (extra: object) => ({
error_type: ErrorTypeEnum.GENERIC_BACKEND_ERROR,
extra,
level: 'error' as ErrorLevel,
message: 'An error occurred',
});