Skip to content

Commit d163787

Browse files
committed
chore(errors): use new format
1 parent f52d781 commit d163787

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) webkid GmbH 2019-2022
3+
Copyright (c) webkid GmbH 2019-2023
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/guides/troubleshooting.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,7 @@ This can happen if you are working with multiple handles and a handle is not fou
396396
### Marker type doesn't exist.
397397

398398
This warning occurs when you are trying to specify a marker type that is not built into React Flow. The existing marker types are documented [here](/docs/api/edges/edge-options/#markerstart--markerend-options).
399+
400+
### Handle: No node id found.
401+
402+
This warning occurs when you try to use a `<Handle />` component outside of a custom node component.

src/pages/error.js

+21-9
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,30 @@ import { useLocation, useHistory } from '@docusaurus/router';
44
import { Box, Heading, Text, Link } from '@chakra-ui/react';
55

66
const redirects = {
7-
'#100': '#warning-seems-like-you-have-not-used-zustand-provider-as-an-ancestor',
8-
'#200':
7+
'#001': '#warning-seems-like-you-have-not-used-zustand-provider-as-an-ancestor',
8+
'#002':
99
'#it-looks-like-you-have-created-a-new-nodetypes-or-edgetypes-object-if-this-wasnt-on-purpose-please-define-the-nodetypesedgetypes-outside-of-the-component-or-memoize-them',
10-
'#300': '#node-type-not-found-using-fallback-type-default',
11-
'#400': '#the-react-flow-parent-container-needs-a-width-and-a-height-to-render-the-graph',
12-
'#500': '#only-child-nodes-can-use-a-parent-extent',
13-
'#600': '#cant-create-edge-an-edge-needs-a-source-and-a-target',
14-
'#700': '#the-old-edge-with-idsome-id-does-not-exist',
15-
'#800': '#couldnt-create-edge-for-sourcetarget-handle-id-some-id-edge-id-some-id',
16-
'#900': '#marker-type-doesnt-exist',
10+
'#003': '#node-type-not-found-using-fallback-type-default',
11+
'#004': '#the-react-flow-parent-container-needs-a-width-and-a-height-to-render-the-graph',
12+
'#005': '#only-child-nodes-can-use-a-parent-extent',
13+
'#006': '#cant-create-edge-an-edge-needs-a-source-and-a-target',
14+
'#007': '#the-old-edge-with-idsome-id-does-not-exist',
15+
'#008': '#couldnt-create-edge-for-sourcetarget-handle-id-some-id-edge-id-some-id',
16+
'#009': '#marker-type-doesnt-exist',
17+
'#010': '#handle-no-node-id-found',
1718
};
1819

20+
// legacy codes - we changed the format but kept the old ones for backwards compatibility
21+
redirects['#100'] = redirects['#001'];
22+
redirects['#200'] = redirects['#002'];
23+
redirects['#300'] = redirects['#003'];
24+
redirects['#400'] = redirects['#004'];
25+
redirects['#500'] = redirects['#005'];
26+
redirects['#600'] = redirects['#006'];
27+
redirects['#700'] = redirects['#007'];
28+
redirects['#800'] = redirects['#008'];
29+
redirects['#900'] = redirects['#009'];
30+
1931
function getLinkFromHash(hash) {
2032
if (redirects.hasOwnProperty(hash)) {
2133
return `/docs/guides/troubleshooting/${redirects[hash]}`;

0 commit comments

Comments
 (0)