Skip to content

Commit

Permalink
Handled API failure cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sahalali committed Oct 25, 2024
1 parent 2eb19e9 commit f111227
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/service/http/http.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Injectable } from "@nestjs/common";
import axios from "axios";
import { Exception } from "../../helper";

@Injectable()
export class HttpService {
Expand All @@ -19,6 +20,7 @@ export class HttpService {
return response?.data;
} catch (e) {
console.log(e);
return Exception.internalServerError(e.message);
}
}

Expand Down

0 comments on commit f111227

Please sign in to comment.