add an exception watch
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-11-21 15:36:39 +01:00
parent c8f1e7e64e
commit aca8b02f42
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
3 changed files with 3 additions and 7 deletions

View file

@ -86,7 +86,7 @@ namespace BirdsiteLive.Pipeline.Processors
private ExtractedTweet[] RetrieveNewTweets(SyncTwitterUser user)
{
var tweets = new ExtractedTweet[0];
var tweets = Array.Empty<ExtractedTweet>();
try
{

View file

@ -29,6 +29,8 @@ namespace BirdsiteLive.Twitter.Extractors
public ExtractedTweet Extract(ITweet tweet)
{
if (tweet == null)
throw new ArgumentNullException("no tweet found");
var extractedTweet = new ExtractedTweet
{
Id = tweet.Id,

View file

@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using BirdsiteLive.Common.Settings;
using BirdsiteLive.Common.Structs;
using BirdsiteLive.DAL.Contracts;
using BirdsiteLive.DAL.Postgres.DataAccessLayers;
using BirdsiteLive.DAL.Postgres.Settings;
using BirdsiteLive.Models;
using BirdsiteLive.Twitter;
using BirdsiteLive.Twitter.Tools;
@ -17,7 +12,6 @@ using Lamar;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;