Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const checkError = (error) => {
} else {
// Pick one of the leftover errors to show in the banner;
const errs = Object.values(errorMap);
return errs ? errs[0][0] : 'Unknown error';
return errs?.[0]?.[0] ? errs[0][0] : 'Unknown error';
}
}
}
Expand Down Expand Up @@ -156,7 +156,8 @@ const DeployedPipeline: React.FC = () => {
);
const { loading, error, data, refetch, networkStatus } = useQuery(QUERY, {
errorPolicy: 'all',
fetchPolicy: 'no-cache',
fetchPolicy: 'cache-and-network',
nextFetchPolicy: 'cache-first',
notifyOnNetworkStatusChange: true,
variables: {
nameFilter: search || undefined,
Expand Down
4 changes: 4 additions & 0 deletions graphql/resolvers-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export function requestPromiseWrapper(options, { auth: token, userIdProperty, us
options.headers[userIdProperty] = userIdValue;
}

if (!options.timeout) {
options.timeout = 5 * 60 * 1000; // 5mins
}

return new Promise((resolve, reject) => {
request(options, (err, response, body) => {
const statusCode = response.statusCode;
Expand Down
Loading