| 
									
										
										
										
											2021-09-09 13:51:06 +00:00
										 |  |  | import { NextPage } from "next"; | 
					
						
							|  |  |  | import React from "react"; | 
					
						
							| 
									
										
										
										
											2021-09-22 19:52:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 13:51:06 +00:00
										 |  |  | import { HttpError } from "@lib/core/http/error"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-22 19:52:38 +00:00
										 |  |  | import { ErrorPage } from "@components/error/error-page"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 13:51:06 +00:00
										 |  |  | const PreviewErrorPage: NextPage = () => { | 
					
						
							|  |  |  |   const statusCode = 403; | 
					
						
							|  |  |  |   const message = `this was an http error ${statusCode}`; | 
					
						
							|  |  |  |   const previousError = new Error("A test error"); | 
					
						
							|  |  |  |   const error = new HttpError({ | 
					
						
							|  |  |  |     statusCode, | 
					
						
							|  |  |  |     message, | 
					
						
							|  |  |  |     url: "http://some.invalid.url", | 
					
						
							|  |  |  |     cause: previousError, | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  |   return <ErrorPage displayDebug={true} statusCode={statusCode} error={error} message={message} />; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default PreviewErrorPage; |