Skip to content

Commit

Permalink
Migrate jira cloud provider to axios (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianruesch authored Nov 21, 2023
1 parent 2db6f46 commit d972908
Show file tree
Hide file tree
Showing 4 changed files with 533 additions and 940 deletions.
19 changes: 19 additions & 0 deletions doc/architecture-decisions/ADR-011.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ADR 11: Axios for calls to the Jira API

## Status

accepted

## Context

We want to be able to configure the headers, base URL and other parameters once for Jira API calls, instead of each time we make a call as previous with the `fetch` and `cross-fetch` packages.

## Decision

We are now using [Axios](https://axios-http.com/docs/intro), a package that enables creation of REST clients and enables us to configure defaults for each call.
Additionally, we are able to define error handlers for specific HTTP error calls, enabling default error handling for e.g. 401 responses.

## Consequences

Every call to the Jira Server API (except for authorization calls to e.g. fetch a token) should be made via an Axios instance.
This also means rewriting the error handling in each call, finding common errors and enabling default handling for them.
Loading

0 comments on commit d972908

Please sign in to comment.