Skip to content

Commit 043c507

Browse files
refactor: remove ForbiddenError from fhirProvider client
Remove the ForbiddenError exception handling from the FHIR provider client implementation. This includes removing the 403 status code handling in the error response logic and updating the corresponding test cases. Key changes: - Remove ForbiddenError from JSDoc throws annotations - Remove 403 status code case from error handling switch statement - Remove ForbiddenError test case from test suite - Update test numbering to reflect removed test 🌿 Generated with Fern
1 parent 7241357 commit 043c507

File tree

6 files changed

+15
-29
lines changed

6 files changed

+15
-29
lines changed

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 6.0.0 - 2026-02-09
2+
* refactor: remove ForbiddenError from fhirProvider client
3+
* Remove the ForbiddenError exception handling from the FHIR provider client implementation. This includes removing the 403 status code handling in the error response logic and updating the corresponding test cases.
4+
* Key changes:
5+
* Remove ForbiddenError from JSDoc throws annotations
6+
* Remove 403 status code case from error handling switch statement
7+
* Remove ForbiddenError test case from test suite
8+
* Update test numbering to reflect removed test
9+
* 🌿 Generated with Fern
10+
111
## 5.2.0 - 2026-02-08
212
* feat: refactor upload request structure with format-specific types
313
* Refactor the upload code system functionality to use a discriminated union approach with format-specific request types. This improves type safety and API clarity by separating CSV and JSON upload requirements.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phenoml",
3-
"version": "5.2.0",
3+
"version": "6.0.0",
44
"private": false,
55
"repository": "github:PhenoML/phenoml-ts-sdk",
66
"type": "commonjs",

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export class phenomlClient {
4040
{
4141
"X-Fern-Language": "JavaScript",
4242
"X-Fern-SDK-Name": "phenoml",
43-
"X-Fern-SDK-Version": "5.2.0",
44-
"User-Agent": "phenoml/5.2.0",
43+
"X-Fern-SDK-Version": "6.0.0",
44+
"User-Agent": "phenoml/6.0.0",
4545
"X-Fern-Runtime": core.RUNTIME.type,
4646
"X-Fern-Runtime-Version": core.RUNTIME.version,
4747
},

src/api/resources/fhirProvider/client/Client.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ export class FhirProvider {
226226
* @param {FhirProvider.RequestOptions} requestOptions - Request-specific configuration.
227227
*
228228
* @throws {@link phenoml.fhirProvider.UnauthorizedError}
229-
* @throws {@link phenoml.fhirProvider.ForbiddenError}
230229
* @throws {@link phenoml.fhirProvider.NotFoundError}
231230
* @throws {@link phenoml.fhirProvider.InternalServerError}
232231
*
@@ -277,11 +276,6 @@ export class FhirProvider {
277276
_response.error.body as unknown,
278277
_response.rawResponse,
279278
);
280-
case 403:
281-
throw new phenoml.fhirProvider.ForbiddenError(
282-
_response.error.body as unknown,
283-
_response.rawResponse,
284-
);
285279
case 404:
286280
throw new phenoml.fhirProvider.NotFoundError(
287281
_response.error.body as unknown,

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = "5.2.0";
1+
export const SDK_VERSION = "6.0.0";

tests/wire/fhir_provider/main.test.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -395,24 +395,6 @@ describe("FhirProvider", () => {
395395
const server = mockServerPool.createServer();
396396
const client = new phenomlClient({ token: "test", environment: server.baseUrl });
397397

398-
const rawResponseBody = { key: "value" };
399-
server
400-
.mockEndpoint()
401-
.get("/fhir-provider/fhir_provider_id")
402-
.respondWith()
403-
.statusCode(403)
404-
.jsonBody(rawResponseBody)
405-
.build();
406-
407-
await expect(async () => {
408-
return await client.fhirProvider.get("fhir_provider_id");
409-
}).rejects.toThrow(phenoml.fhirProvider.ForbiddenError);
410-
});
411-
412-
test("get (4)", async () => {
413-
const server = mockServerPool.createServer();
414-
const client = new phenomlClient({ token: "test", environment: server.baseUrl });
415-
416398
const rawResponseBody = { key: "value" };
417399
server
418400
.mockEndpoint()
@@ -427,7 +409,7 @@ describe("FhirProvider", () => {
427409
}).rejects.toThrow(phenoml.fhirProvider.NotFoundError);
428410
});
429411

430-
test("get (5)", async () => {
412+
test("get (4)", async () => {
431413
const server = mockServerPool.createServer();
432414
const client = new phenomlClient({ token: "test", environment: server.baseUrl });
433415

0 commit comments

Comments
 (0)