()
| 92 | let _blitzErrorClassRegistered = false |
| 93 | |
| 94 | export function registerBlitzErrorClasses() { |
| 95 | if (_blitzErrorClassRegistered || !isNotInUserTestEnvironment()) return |
| 96 | SuperJson.registerClass(AuthenticationError, { |
| 97 | identifier: "BlitzAuthenticationError", |
| 98 | allowProps: errorProps, |
| 99 | }) |
| 100 | |
| 101 | SuperJson.registerClass(CSRFTokenMismatchError, { |
| 102 | identifier: "BlitzCSRFTokenMismatchError", |
| 103 | allowProps: errorProps, |
| 104 | }) |
| 105 | |
| 106 | SuperJson.registerClass(AuthorizationError, { |
| 107 | identifier: "BlitzAuthorizationError", |
| 108 | allowProps: errorProps, |
| 109 | }) |
| 110 | |
| 111 | SuperJson.registerClass(NotFoundError, { |
| 112 | identifier: "BlitzNotFoundError", |
| 113 | allowProps: errorProps, |
| 114 | }) |
| 115 | |
| 116 | SuperJson.registerClass(RedirectError, { |
| 117 | identifier: "BlitzRedirectError", |
| 118 | allowProps: errorProps, |
| 119 | }) |
| 120 | |
| 121 | SuperJson.registerClass(PaginationArgumentError, { |
| 122 | identifier: "BlitzPaginationArgumentError", |
| 123 | allowProps: errorProps, |
| 124 | }) |
| 125 | |
| 126 | SuperJson.registerClass(OAuthError, { |
| 127 | identifier: "OAuthError", |
| 128 | allowProps: errorProps, |
| 129 | }) |
| 130 | |
| 131 | _blitzErrorClassRegistered = true |
| 132 | } |
| 133 | |
| 134 | registerBlitzErrorClasses() |
no test coverage detected