Skip to content

Commit

Permalink
fix retry with alternate registry server (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar authored Jan 8, 2025
1 parent 3525a11 commit d6ab2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CodeAndPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ export function CodeAndPreview({ snippet }: Props) {
return response.data
} catch (error: any) {
if (
error.response &&
import.meta.env.VITE_ALTERNATE_REGISTRY_URL &&
error.response.status === 413
error.status === 413
) {
console.log(`Failed to update snippet, attempting alternate registry`)
const response = await axios.post(
`${import.meta.env.VITE_ALTERNATE_REGISTRY_URL}/snippets/update`,
updateSnippetPayload,
Expand Down

0 comments on commit d6ab2ae

Please sign in to comment.