grassrootsgrocery / admin-portal

GNU Affero General Public License v3.0
10 stars 5 forks source link

Added new error handling for airtable fetches #113

Closed 6mp closed 1 year ago

6mp commented 1 year ago

References #108

Use new AirtableResponse type to ensure errors relating to airtable fetches are communicated to the client.

Also renames Record to AirtableRecord to avoid confusion with the builtin type Record

export type AirtableResponse<T> =
  | { kind: "success"; records: AirtableRecord<T>[]; error?: never }
  | { kind: "error"; error: string; records?: never };

Handling these on the client still needs some implementation though.

railway-app[bot] commented 1 year ago

This PR is being deployed to Railway 🚅

admin-portal: ◻️ REMOVED