In my attempts to use the [Approval class](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_approval.htm) methods to unlock locked records or to lock unlocked records, I have encountered the following warning: 

> 
> System.UnexpectedException: null
> 
> 
> 

I saw this error both when running anonymous apex: 

```
Approval.lock('0019000001dBwi4');

```

and when using a trigger:

```
trigger AccountTrigger on Account (after insert, after update) {
    Approval.lock(trigger.new,false);
}

```

Does anyone know what would be causing this error or how I could get around it?