Skip to content

Commit

Permalink
fix: author error check to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynndp committed Mar 5, 2022
1 parent 63d442f commit f6d6659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/apiUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export async function handleResponse(response) {
if (response.status === 400) {
throw new Error(error);
}
if (response.status === 500 && error.includes('author')) {
if (response.status === 500 && error.includes('Author handle not found')) {
// server-side error occurred. Author account not found.
return {
error: true,
message: "The author account wasn't found.",
message: error,
};
}
throw new Error('Network response was not ok.');
Expand Down

0 comments on commit f6d6659

Please sign in to comment.