Skip to content

Commit c27ead5

Browse files
committed
handle simple problem responses
1 parent 8a60df2 commit c27ead5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const PageTypes = {
2121
*/
2222
const App = ({ resource, problem }) => {
2323
if (problem) {
24-
const statusCode = problem.response.status;
24+
const statusCode = problem.status;
2525
const phrases = {
2626
403: 'Sign in or get out!',
2727
404: "Oops, this is not the page you're looking for.",

src/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { renderToString } from "react-dom/server";
88
* This is used for server-side rendering. Notice that the App component receives a "resource" parameter in the same
99
* manner as in the browser-only Socket component.
1010
*/
11-
const render = ({resource, problem}) => renderToString(<App resource={resource} />);
11+
const render = ({resource, problem}) => renderToString(<App resource={resource} problem={problem} />);
1212

1313
// It is important to export a function named "render" from this file. This is how the Applura service loads and renders
1414
// the application on the server. This file should not contain a default export.

0 commit comments

Comments
 (0)