Skip to content

Commit

Permalink
chore: resolve most of the comments from cshfang cont.
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiSF committed Aug 22, 2024
1 parent d30b77e commit d418f0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import {
import { assertServiceError } from '../../../../../../errors/utils/assertServiceError';
import { AuthError } from '../../../../../../errors/AuthError';

export const createEmptyResponseDeserializer = <Output>(): ((
response: HttpResponse,
) => Promise<Output | undefined>) => {
return async (response: HttpResponse): Promise<Output | undefined> => {
export const createEmptyResponseDeserializer =
<Output>(): ((response: HttpResponse) => Promise<Output | undefined>) =>
async (response: HttpResponse): Promise<Output | undefined> => {
if (response.statusCode >= 300) {
const error = await parseJsonError(response);
assertServiceError(error);
Expand All @@ -20,4 +19,3 @@ export const createEmptyResponseDeserializer = <Output>(): ((
return undefined;
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {
import { assertServiceError } from '../../../../../../errors/utils/assertServiceError';
import { AuthError } from '../../../../../../errors/AuthError';

export const createUserPoolDeserializer = <Output>(): ((
response: HttpResponse,
) => Promise<Output>) => {
return async (response: HttpResponse): Promise<Output> => {
export const createUserPoolDeserializer =
<Output>(): ((response: HttpResponse) => Promise<Output>) =>
async (response: HttpResponse): Promise<Output> => {
if (response.statusCode >= 300) {
const error = await parseJsonError(response);
assertServiceError(error);
Expand All @@ -22,4 +21,3 @@ export const createUserPoolDeserializer = <Output>(): ((

return parseJsonBody(response);
};
};

0 comments on commit d418f0f

Please sign in to comment.