Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/components/Pages/HostingPolicy/HostingPolicyRenderer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@ export default {
if (this.isUpcomingRoute) {
response = await this.$api.getUpcomingPolicyByType({ policyType })
} else if (this.isCurrentRoute) {
response = await this.$api.getCurrentPolicyByType({ policyType })
if (response === undefined) {
// Special case to redirect users to the pilot policy if there is no current policy
// Remove afer T408316
this.$router.replace({ path: '/hosting-policy/pilot' })
// Special case to redirect users to the pilot policy if there is no current policy
// Remove afer T408316
try {
response = await this.$api.getCurrentPolicyByType({ policyType })
} catch (error) {
if (error && error.response && error.response.status === 404) {
this.$router.replace({ path: '/hosting-policy/pilot' })
return
}
}
} else {
response = await this.$api.getPolicyByDate({ policyType, activeFrom })
Expand Down
Loading