Skip to content

Commit

Permalink
fix: encode title in apollo client
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Sep 9, 2024
1 parent fb31236 commit 5b7b58f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/hooks/useProcessError.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const useProcessError = (error) => {
const [errorState, setErrorState] = React.useState(false)

React.useEffect(() => {
if (error) {
// eslint-disable-next-line no-console
console.error(error)
}
if (error?.networkError && 'statusCode' in error.networkError) {
if (error.networkError?.statusCode === 464) {
useMemory.setState({ clientError: 'old_client' })
Expand Down
2 changes: 1 addition & 1 deletion src/services/apollo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const apolloCache = new InMemoryCache({
export const apolloClient = new ApolloClient({
uri: '/graphql',
link: abortableLink.concat(createHttpLink()),
name: CONFIG.client.title,
name: encodeURIComponent(CONFIG.client.title),
version: CONFIG.client.version,
cache: apolloCache,
})

0 comments on commit 5b7b58f

Please sign in to comment.