File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class FortniteAPIError extends Error {
99 * The HTTP method
1010 */
1111 public method : string ;
12-
12+
1313 /**
1414 * The URL of the requested API endpoint
1515 */
@@ -35,7 +35,7 @@ class FortniteAPIError extends Error {
3535 this . name = 'FortniteAPIError' ;
3636 this . message = error . error ;
3737
38- this . method = request . method ! . toUpperCase ( ) ;
38+ this . method = request . method ? .toUpperCase ( ) ?? 'GET'
3939 this . url = request . url ! ;
4040 this . httpStatus = status ;
4141 this . requestParams = request . params ;
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class HTTP {
4343 } ;
4444
4545 try {
46- const response = await this . axios ( config ) ;
46+ const response = await instance ( config ) ;
4747
4848 return response . data ;
4949 } catch ( e ) {
@@ -56,7 +56,7 @@ class HTTP {
5656 }
5757 }
5858
59- throw new FortniteAPIError ( e . response . data , config , e . response . status ) ;
59+ throw new FortniteAPIError ( e . response . data , e . config ?? config , e . response . status ) ;
6060 }
6161
6262 throw e ;
You can’t perform that action at this time.
0 commit comments