feat: update timeout error UX (#10274)

This commit is contained in:
Erik Ritter
2020-07-20 15:32:17 -07:00
committed by GitHub
parent d92cb66f60
commit 5fa4680447
29 changed files with 557 additions and 65 deletions

View File

@@ -16,9 +16,22 @@
* specific language governing permissions and limitations
* under the License.
*/
import getErrorMessageComponentRegistry from 'src/components/ErrorMessage/getErrorMessageComponentRegistry';
import { ErrorTypeEnum } from 'src/components/ErrorMessage/types';
import TimeoutErrorMessage from 'src/components/ErrorMessage/TimeoutErrorMessage';
import setupErrorMessagesExtra from './setupErrorMessagesExtra';
export default function setupErrorMessages() {
// TODO: Register error messages to the ErrorMessageComponentRegistry once implemented
const errorMessageComponentRegistry = getErrorMessageComponentRegistry();
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.FRONTEND_TIMEOUT_ERROR,
TimeoutErrorMessage,
);
errorMessageComponentRegistry.registerValue(
ErrorTypeEnum.BACKEND_TIMEOUT_ERROR,
TimeoutErrorMessage,
);
setupErrorMessagesExtra();
}