Refactor database queries and handle non-429 errors in history
Updated database query code to use consistent parameter naming and revised query structure for clarity. Added logic in the history component to return existing data when encountering non-429 HTTP errors.
This commit is contained in:
@@ -66,6 +66,9 @@ export class HistoryComponent implements OnInit, OnChanges {
|
||||
let retrySeconds = 5;
|
||||
|
||||
if (err instanceof HttpErrorResponse) {
|
||||
if (err.status !== 429) {
|
||||
return this.history;
|
||||
}
|
||||
const headers = err.headers;
|
||||
const retryAfterHeader = headers.get('Retry-After');
|
||||
console.warn(err.error);
|
||||
|
||||
Reference in New Issue
Block a user