Skip to content

Commit

Permalink
refactor: changed "Article does not exist" status code to 404
Browse files Browse the repository at this point in the history
  • Loading branch information
happychuks committed Nov 27, 2024
1 parent 5401547 commit 51ef3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/apps/research/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def retrieve_by_identifier(self, request, identifier=None):
except Exception as e:
logger.error(f"Error retrieving article by identifier: {e}")
return Response({'error': 'Article does not exist'},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
status=status.HTTP_404_NOT_FOUND)

# Custom action to retrieve articles by category
@action(detail=False, methods=['get'], url_path=r'category/(?P<category>[-\w]+)')
Expand Down

0 comments on commit 51ef3ed

Please sign in to comment.